Robert Burns
Registered User.
- Local time
- Today, 09:51
- Joined
- Jul 1, 2002
- Messages
- 14
Hi there,
I am having trouble due to my lack of syntax knowledge regarding the 'wherecondition' part of the DoCmd.OpenReport command. I am opening a report from various command buttons on a form and applying different filter criterias. This works fine when filtering on a field being equal to one value, as in:
strFilter = "Claims = 'None' "
DoCmd.OpenReport "rptFiltered", acViewPreview,,strFilter
but doesn't work when filtering on a field equal to one of two values, as in:
strFilter = "Claims = 'Settled' Or 'Both' "
DoCmd.OpenReport "rptFiltered", acViewPreview,,strFilter
Can someone help me with the correct syntax please.
Thanks very much,
Rob.
I am having trouble due to my lack of syntax knowledge regarding the 'wherecondition' part of the DoCmd.OpenReport command. I am opening a report from various command buttons on a form and applying different filter criterias. This works fine when filtering on a field being equal to one value, as in:
strFilter = "Claims = 'None' "
DoCmd.OpenReport "rptFiltered", acViewPreview,,strFilter
but doesn't work when filtering on a field equal to one of two values, as in:
strFilter = "Claims = 'Settled' Or 'Both' "
DoCmd.OpenReport "rptFiltered", acViewPreview,,strFilter
Can someone help me with the correct syntax please.
Thanks very much,
Rob.