Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report not giving info as I want it 1

Status
Not open for further replies.

VirtualWebgistics

Programmer
Sep 10, 2001
45
US
First, I am no Access guru ... and although I've learned the basics, I still have troubles most days.

I have an Access db I created, which has a table called 'Frequency', which has 'weekly', 'monthly', 'as needed', semi-annual', "annual" etc. in it. I have created a report which is sorted based on frequency, and used a combo drop-down box where the selection can be made.

However, now I am thinking I'd rather have the reports all print seperately, and am not sure how to achieve that. I'm not sure if I need to put each frequency (weekly, monthly, as needed, etc.) each in their own individual tables in order to do this, or if I need to know some coding to make this happen?

Basically in my Switchboard, I'd like for there to be buttons for "Print reports for weekly frequency", "Print reports for monthly frequency", "Print reports for semi-annual frequency", etc.

If anyone has a little time and could help me with this, it would be greatly appreciated.

Warmly, Jules
 
is this in 2000? I am guessing it is - ??? we still have 97 on most PC's so I still have 97 - .....Give me your email address and I am going to send you a sample -

Fred
 
Fred, it is 2000. Sorry. And dran, I really wanted you to see it!! Bummer!!

Send it to jules@virtualwebgistics.com

HUGz! Jules
 
I was able to look @ your database - the problem is that you have your report based on the data not on the query - change the recordsource of the report to your query


Let me know

Fred

 
Actually, I meant to say you have the report based on the table .... you need to change the recordsource to the query

Fred
 
Fred, thanks for looking at it! However, I want to make sure I've got this straight.

In the report called "Building" I am going to change the recordsource to the query named "BuildingQuery"?

And in the report named "Frequency" I am going to change the recordsource to the query named "FrequencyQuery"?

Thanks!! Jules
 
That is correct - the purpose of the query is to pull only the records that you want on the report from the table - I did not have a lot of time to review the database. You could have made one report using both but perhaps you can modify that later.

Also, you will want the report to tell the users what exactly the report contains. You can put a text box in the report header and put something like this: (example is for the building report)

=iif(isnull([forms]![yourform]![building]),"Report shows all buildings","Report shows" & " " & [forms]![yourform]![building])

Fred
 
Great ... thanks for the explain.

Now ... regarding:

=iif(isnull([forms]![yourform]![building]),"Report shows all buildings","Report shows" & " " & [forms]![yourform]![building])

I don't mean to sound stoopid, but where do I put that?

HUGz! Jules
 
You create a text box in the header of the report - Make the text box the width of the entire report - Go to the properties of the text box and select the data tab - this will go in the control source.

Fred
 
And I just put all of that in the record source? Or do I click on the three ... and put it in the Expression Builder somehow?

One other question (and no, I'm not trying to drive you nuts!) My new Switchboard now opens when I open the file, thanks to your directions and help! However, can I tell it the exact size I want it to open?

Thanks bunches! Jules
 
Yes, just put all that in the record source - include the equal sign .... make sure you udpdate it with your formname and the combobox name from your form-

If you want the form to open up fully:

In the on open event of the form (go into the form in design view and go to the form properties - select the event tab - In the on open even select event procedure and select the ... to the right - this will open the module. enter:

'Maximize the switchboard when it opens
DoCmd.SelectObject acForm, "your form name", True
DoCmd.Maximize


That should do it -

Fred
 
Fred -- you are a doll!!

RE: =iif(isnull([forms]![yourform]![building]),"Report shows all buildings","Report shows" & " " & [forms]![yourform]![building])

is that =iif or =if with one i? :)

HUGz! Jules
 
Fred, two things ...

=iif(isnull([forms]![yourform]![building]),"Report shows all buildings","Report shows" & " " & [forms]![yourform]![building])

I see where I put my form name where you have placed [yourform] but where in there do I put the combobox name? I'm confused ... it's Friday.

Also, regarding opening the form fully, when I click the three ... next to the 'on event', it opens a box and asks me to Choose Builder, and the three choices are "Expression Builder", "Macro Builder" and "Code Builder" -- which one of those do I use?

Thanks!! Jules
 
regarding number one - put your combo box name where I put "building"

the second,

from the dropdown box in the open event choose event procedure... then click the ...

Fred
 
Fred, I must have screwed something up, because now when I'm at the Switchboard, and I click on the combo box, and select a building let's say, and then hit the action button, a box pops up that asks me to enter a perameter. :(

If I enter in one of the building names, another perameter box pops up and asks for the category, etc. It's like it's asking for perameters it is pulling from the form.

I'm so confused. Jules
 
Lets just overview here - I will use only one of the reports (building) as an example:

You have a form that has a combo box where you select the building and a button to run the report.

The report has the recordsource that is the query to pull your data. That query has in the criteria field for the building [forms]![yourform]![yourcomboboxname] or [forms]![yourform]![yourcomboboxname] is null

Make sure that criteria in the query has the correct form name and field name. Also make sure that the field we added to the report has the correct form name and field names.

If you still have a problem, let me know and I will go back into your data and look @ it -

Fred
The query has
 
Fred, I added the [forms]![yourform]![yourcomboboxname] or [forms]![yourform]![yourcomboboxname] is null to the actual drop-down box. Maybe I was supposed to do it to the button instead?

Maybe it's because it's Friday or something, but things aren't clicking for me today here. Bluh

HUGz! Jules
 
No, that criteria is supposed to go in the criteria of your query.

Fred
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top