Where condition problem

human_anomaly

Registered User.
Local time
Today, 16:20
Joined
Apr 12, 2004
Messages
69
This should have a pretty simple answer. All I am trying to do is open a report and throw multiple where clauses at it. I am connecting them with "and" and it seems to like the syntax but as soon as I run the macro from the form button it chokes. I've triple checked my form names and control names. Anyone know how to do a multiple where condition? Here is my code:

[Student]=[Forms]![FrmSubStudent]![Student] And [Scenario]=[Forms]![FrmSubStudent]![Scenario] And [Date1]=[Forms]![FrmSubStudent]![Date1]
 
These work individually:
[Student]=[Forms]![FrmSubStudent]![Student]

[Scenario]=[Forms]![FrmSubStudent]![Scenario]

however when I combine them they do not work, like this:

[Student]=[Forms]![FrmSubStudent]![Student] AND [Scenario]=[Forms]![FrmSubStudent]![Scenario]
 
Just a guess, but are any of the fields likely to be Null?

Col
 
but the code in the criteria box is:
= N'[Forms]!FrmSubStudent!Scenario'
and i don't think that is right
 

Users who are viewing this thread

Back
Top Bottom