Re: Combo Box sort for Report

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Todd (anonymous_at_discussions.microsoft.com)
Date: 03/24/05


Date: Thu, 24 Mar 2005 06:37:28 -0800

Sorry, I did have the text box listed in the company group
header and not page header. Sorry about that. I entered
the formula in the text field of the company group header
in the report and it didn't work. Here is what I entered:

=IIf([Forms]![frmrptparam]![casinonamesort]="IsNull","All
Companies",[Forms]![frmrptparam]![casinonamesort])

In your response you said to enter the [IsNullField] in
the first part of the expression. Are you talking about
the field in the query that I set to Is Null? The above
expression lists the actual combobox on the reports form.
But I did try the actual field that the combobox
references and that didn't work.

Here Is how my query is setup.

In the query, the companyname field has a criteria of:

[Forms]![frmrptparam]![casinonamesort] This references the
report form where the combobox is for selecting a company
to print information on.

Next I added another field in the query and in the field
name I entered the same expression: [Forms]![frmrptparam]!
[casinonamesort], then I entered Is Null in the Or section
that is listed below the critera (I entered nothing in the
criteria of this field).

Again, if I enter nothing in the combobox in the report
form, the report will pull up all the companies and their
information but in the company header it won't show the
company name for each company. It will show the company
name if you select a company from the combobox.

I must be doing something wrong. Any ideas?

>-----Original Message-----
>Place a text control in the header with... (use your own
names)
> =IIF([Forms]![formname]![IsNullField]="IsNull","All
>Companies",[Forms]![formname]![combobox])
>If you're reporting on All Companies, don't list them in
the header... use
>the Company Group header to list each as they are
reported upon.
>hth
>Al Camp
>
>"Todd" <anonymous@discussions.microsoft.com> wrote in
message
>news:085101c52f23$ebbefb90$a601280a@phx.gbl...
>> On my reports form I've got a report where you can
select
>> from a combo box which company you want to print
>> information. Once selected, the page header of the
report
>> has a text field that will display whichever company I
>> selected: control source is [Forms]![reportformname]!
>> [comboboxname].
>>
>> In the query the report is based on I've got an
additional
>> field referencing the combobox to where if no company is
>> selected the report will show all companies. This field
>> is set to "Is Null". This works fine but it doesn't
>> display the company names in the page header.
>>
>> How can I change the control source in the page header
to
>> still display the company names in the header when I
don't
>> actually select a company. Or is this the wrong
approach
>> to take?
>>
>
>
>.
>



Relevant Pages

  • Re: How can I get a big "A" at the beginning of the A people, "B",
    ... Doesn't read as if you did what Dale suggested, because you did not say that ... you put the calculaltion in the query you are using as Record Source. ... (What I did exactly was go to the report, design view, right clicked on ... header yes, group footer no, group on (didn't know what to do there so ...
    (microsoft.public.access.reports)
  • Re: Remove repeat section headers
    ... I'll stick with my assessment that a union query might resolve your issue. ... 'Type' field names and data types, and desired display in your report. ... but I need to have a header for each and mess with the ...
    (microsoft.public.access.reports)
  • Re: Field Prints Different When I change it to heading.
    ... "Duane Hookom" wrote: ... Is your report now working as expected? ... Did your original query contain the team name field? ... same results when I chose the Team name as a header. ...
    (microsoft.public.access.reports)
  • Re: SELECT Statement in a Report
    ... I put the VBA code in the header and changed it to: ... the query is and the field names are ... I am trying to do this in a report. ... relevant section to assign the value to the control. ...
    (microsoft.public.access.reports)
  • Re: Proper case and passing parameters
    ... if you had a textbox in the header and wanted to ... rather report the range the the start and end date represent. ... Source property equal to the name of your query input parameter to show its ...
    (microsoft.public.access.reports)