Report from combobox

AndyCompanyZ

Registered User.
Local time
Today, 17:03
Joined
Mar 24, 2011
Messages
223
Hi all


It's been a while since I've posted on here (feels like confession). I am trying to get a report based on a selection from a combobox. The issue is many fold. Firstly I have been playing around with it so much that I have messed up the syntax and can't remember what I had. Here is what I have at the moment (this is based on a button):
DoCmd.OpenReport "RepClassrooms", acViewPreview, , " Class = '" & Me.cmboRepClass & "'"


I know it's probably an issue with my apostrophes but I can't find the right syntax anywhere.
The second issue is that it isn't filtering on the combobox - it gives all the data from the database based on all the entries in the combobox but this is probably down to the syntax again.


Can anyone help please. I can supply more information if needed.
 
Now when I run it produces the report but with no information only headers.
 
Your sin has been forgiven :)

Are you positive that the bound field of the combo box is text? Also enclose the word Class in square brackets.
 

Users who are viewing this thread

Back
Top Bottom