Create report based on combo/list box selection

Status
Not open for further replies.

mmjr103

Registered User.
Local time
Today, 11:59
Joined
May 14, 2012
Messages
10
Good Evening Everyone,

I am very newbie to this forum, as a matter of fact I am still trying to learn access as well.

I have managed to create a database with multiple tables, that are all, in some manner connected to the main table. I have created a form, put a combo/list box on the form. I would like for the user to select from the combo/list box and generate the report based on the selection.

I am not sure if I need to first create a query to accomplish this or not.

Please give me some direction. I do not know much about access or VBA code, so please take it slow.

Thanks in advance for any information, and/or direction.
 
hi,

you can execute the docmd.openreport("reportname") on afterupdate property of the combo/listbox by refering this value in the criteria of field in the query
 
OK, I appreciate the response, but where do I go to get to the docmd.openreport?

Do I use this on the Command button? Not sure where to go. Can you provide a little better direction?

Thanks again
 
hi,

click the combo/listbox then property then event tab then select event procedure on after update for opening code window. between "private sub...........end sub" put the code docmd.openreport"reportname". in the query you have to put "[Forms]![formname].[listboxname]" in criteria of field you want to filter the data
 
OK, in the form I have a combo/list box and then a command button. Will the information that you listed above generate the report as soon as the selection is made in the combo/list box, or will the user still have to click the command button.

In the same form, I also have 2 combo/list boxes that I want the user to make two selections to further filter the information the is generated in the report.

Also, in my combo/list box how can I get it to say 'select' in the box, without it being in the list?

Sorry, I am very new to access and the vb programming, so you may have to provide a little more of an explanation.

Thanks
 
put the criteria in query as you require form list / combobox . Then you may execute docmd in click event of command button
 
Status
Not open for further replies.

Users who are viewing this thread

Back
Top Bottom