Need a report...

AccessNewb

Registered User.
Local time
Today, 21:26
Joined
Oct 29, 2002
Messages
20
Ok, HERE GOES

I need a report created. The report is going to contain all attributes of one record from a query I have made.
I would like to achieve this by having a drop down list on a form.
Now, how can I do this?
I have a drop down list(Combo box) and I can chose a record from the query. BUT, what do I need to do to relate this to the report? Once I have an ID selected from the Combo box, do i need to create a command button? What do I have to do to the command button to get it to accept the chosen ID and then get it from the query and then display it to the report?

Hope this reads ok
Thanks inadvanced

BTW, I need help quickly
 
Well you need the combobox bound to the unique key in the record. Then use the docmd.openreport in the command button with a where clause that references the combobox.
 
could you give and example of the syntax for the WHERE clause in the docmd.openreport?


Thanks
 
DoCmd.OpenReport "ReportName", , ,"[UniqueID]=" & Me!ComboBoxName

That will work if the unique id is an integer. If it's not use this:

"[UniqueID]=" & "'" & Me!ComboBoxName & "'"
 
could you give and example of the syntax for the WHERE clause in the docmd.openreport?


Thanks
 
Was this a mistake that your last two posts were the same?

I gave an example.
 
Yeah, my systems was frozen so I hit refresh and I gues that did it. SORRY

Thanks for the example
 
That worked great!
Lets see, about 15 hours to get this to report properly.
HMMM,

Thanks again.
 

Users who are viewing this thread

Back
Top Bottom