Compound Statement

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

Guest

I have this in a Command button (click Event) which works fine.

DoCmd.OpenForm stDocName, acNormal, , "sheetdate between date() and
(date()-2)"

But I'm trying to figure out how to make an compound statement.

I tried this (it doen't work):
("sheetdate between date() and (date()-2)" AND Me.cboEmployee.Value=User)

cbo.Employee.Value is a combo boc on the form and User is a text field on a
"Table1" field

Thanks
 
Try this which assumes User is a text field in the form that is filtered to
cboEmployee:
DoCmd.OpenForm stDocName, acNormal, , _
"[sheetdate] between date() and date()-2 AND " & _
"[User]=""" & Me.cboEmployee & """"
 
Back
Top