I'm having trouble with the syntax of a WHERE clause.
I need to open rptAvery5160 in print preview WHERE tblConstituents.Profile Type = "Individual" AND tblConstituents.Status = "Active" AND tblConstituents.EmailOK = "Yes" AND tblConstituents.SCP-M = "Yes"
The two yeses (EmailOK and SCP-M) are Yes/No data type fields.
I"ve tried this but with no luck...
Private Sub Command118_Click()
DoCmd.OpenReport "rptAvery5160", acViewPreview, , (((tblConstituents.ProfileType)="Individual") AND ((tblConstituents.Status)="Active") AND ((tblConstituents.EmailOK)=Yes) AND ((tblConstituents.[SCP-M])=Yes))"
I just can't seem to get the syntax correct.
Any suggestions would be greatly appreciated.
I need to open rptAvery5160 in print preview WHERE tblConstituents.Profile Type = "Individual" AND tblConstituents.Status = "Active" AND tblConstituents.EmailOK = "Yes" AND tblConstituents.SCP-M = "Yes"
The two yeses (EmailOK and SCP-M) are Yes/No data type fields.
I"ve tried this but with no luck...
Private Sub Command118_Click()
DoCmd.OpenReport "rptAvery5160", acViewPreview, , (((tblConstituents.ProfileType)="Individual") AND ((tblConstituents.Status)="Active") AND ((tblConstituents.EmailOK)=Yes) AND ((tblConstituents.[SCP-M])=Yes))"
I just can't seem to get the syntax correct.
Any suggestions would be greatly appreciated.