based on combo box selection display report

rexb

Registered User.
Local time
Today, 00:28
Joined
Oct 29, 2008
Messages
129
Hello,

I have a form with a combo box on it. this combo box displays different location. If a location is chosen I need to call a report and display the particulars. Can somebody help me please. I already made the form and combo box and the report it's just that I don't know the code to make it work together.
 
Yes; I guess I have to somehow highlight these comments from that link:

or DoCmd.OpenReport

As noted above, this technique can also be used when opening reports
 
Yes; I guess I have to somehow highlight these comments from that link:

or DoCmd.OpenReport

As noted above, this technique can also be used when opening reports

sorry about that i don't know how i could miss that, but i need help i've tried putting the code but still doesn't work so I've attached the database can you show me how?

Thank you
 

Attachments

Try this, as your field in the report is the text value, not the ID:

DoCmd.OpenReport "rptLeaseCostbyCity", acViewPreview, , "City='" & Me.cboFindCity.Column(1) & "'"
 
Try this, as your field in the report is the text value, not the ID:

DoCmd.OpenReport "rptLeaseCostbyCity", acViewPreview, , "City='" & Me.cboFindCity.Column(1) & "'"


Thank you so very much. It works.
 

Users who are viewing this thread

Back
Top Bottom