Open form with 2 criteria

A

Alan T

I need to open a form which need to satisfy 2 conditions.
I know how to specify 1 condition but no idea how to specify 2.
 
A

Allen Browne

You can combine multiple conditions in the WhereCondition of OpenForm.

Essentially the WhereCondition has to end up like the WHERE clause of a
query, including the correct delimiters. This example shows how to use
criteria on a numeric field, a Text field, and a Date field:
Dim strWhere As String
strWhere = "(MyNumber = 1) AND (MyText = ""dog"") AND (MyDate =
#1/1/2007#")
DoCmd.OpenForm "Form1", WhereCondition:=strWhere
 
Top