Report with conditions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a macro that opens a form & gets a combination of user input along
with data from a query that the form is based on. I would like one of two
reports to print depending on the value of one data field which can only be Y
or N. How do I get this to happen. I was trying to use the macro lines like
this:
Condition Action
[myForm]![myField]='Y' Open Report A
[myForm]![myField]='N' Open Report B

....but it's not working. Help - please.

Thanks,
MelissaS
 
is the macro running from the form? if so, you don't need to reference the
form in the conditional statement, just the control name. also, is the field
a Text data type, or is it a Yes/No data type? if it's a Yes/No data type,
then it's actually a Boolean value, which is True or False (without any
quotes), as

[FieldName] = True
[FieldName] = False

hth
 
Back
Top