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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

combo list for reports

Status
Not open for further replies.

skaurd

Technical User
Jun 4, 2002
51
0
0
GB
Hi

How would I run a query/report with a prompt which has a combo list of choice to choose from only? Rather than inputting the answer in the prompt window?

thanks

S
 
you need a form to put the combo box on
Next to it you have a button to open the report.
The report isusing a query that is lloking at the combo box.
DougP, MCP
 
Hi Doug

Thanks for this. But can you give me clearer step by step instructions as I really do not understand what to do. Sorry, but I am not that clued up with Access
 
Hi,
Create a form with a combo box and a command button. In the combo box, display the choices to the user. In the Click event of the command button, put in code to open the report with the specified criteria. Hope it helps. Let me know what happens.
With regards,
PGK
 
Hi

i am also trying to do this, i have created the form with the combobox to display the choices and added the command button so in the on click event of the command button do i write in vba

DoCmd.OpenReport"ReportName" and then what?????????? CJB
 
Hi PGK

Thanks for your help. But which code do I put in?

yours gratefully

S
 
Create a blank form.

Use the combobox wizard to put a combo box on the form.

Next, save the form say FrmSelect. Switch to Form view and select an item off the combo box.

Leave the form open and open the query that is the data source for the report. Click in the criteria for the field from the combo box.

Click the magic wand on the toolbar. In the expression builder double click Forms, Loaded forms and select the combobox. Click OK and save and close the query.

Return to the form FrmSlect and switch to design view. Add a command button using the wizard and select Reoprt, preview report and follow the rest of the wizard.

Switch to form view and that should do it Neil Berryman
IT Trainer
neil_berryman@btopenworld.com
 
Neil,

I did this yesterday and it worked fine but when i try it today on a new form the combobox is displaying all instances that the selection in the combobox has been used

Like

admin
finance
It
It
Finance
admin
admin

instead of just showing
admin
finance
it

what am i doing wrong today CJB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top