Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntax troubles: DoCmd.OpenForm with Boolean where 1

Status
Not open for further replies.

ThinWhiteDude

Technical User
Sep 21, 2004
97
US
Am having some trouble with syntax on DoCmd.OpenForm and using a where clause. I would like to open the form and show only the records where the ysnPlantMgrReviewed field is equal to No. Here’s what I have tried, and is not working:

Code:
DoCmd.OpenForm "frmObservations", acNormal, , "ysnPlantMgrReviewed=0"
I don't get an error message, just no data when I should.

This is the first time I’ve tried to use the where condition with a Boolean field, so I’m lumbering along here. Couldn’t find this through various searches on the forums, not to say it isn’t there, just might not have known quite how to search for it.

Anyhow, any help will be greatly appreciated,
TWD
 
How are ya ThinWhiteDude . . . . .

Not sure what you have but try:
Code:
[blue]"ysnPlantMgrReviewed='No'"[/blue]
or . . . if its a boolean field (checkbox), try:
Code:
[blue]"ysnPlantMgrReviewed=False"[/blue]

Calvin.gif
See Ya! . . . . . .
 
AceMan1,

That did the trick, thanks for your help again and have a star!
TWD
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top