C
Chris Nebinger
Do you have the form made up?
There are different ways you can do this. The easiest is
to create the form, and add the button to it. Then, use
the DoCmd.OpenReport method with the WhereCondition:
dim strWhere as String
strWhere = "NumericField=" & Me.Control1
strWhere = strWhere & " AND TextField = '" & me.Control2
& "'"
strWhere = strWhere & " AND DateField = #" & me.Control3
& "#"
docmd.OpenReport "ReportName",acViewPreview ,,strWhere
Now, replace the Control1, Control2, & Control3 names with
the real control names. Also, keep in mind that you have
to use the single quotes for text fields (and memo), and
the pound signs for date/time fields.
Chris Nebinger
There are different ways you can do this. The easiest is
to create the form, and add the button to it. Then, use
the DoCmd.OpenReport method with the WhereCondition:
dim strWhere as String
strWhere = "NumericField=" & Me.Control1
strWhere = strWhere & " AND TextField = '" & me.Control2
& "'"
strWhere = strWhere & " AND DateField = #" & me.Control3
& "#"
docmd.OpenReport "ReportName",acViewPreview ,,strWhere
Now, replace the Control1, Control2, & Control3 names with
the real control names. Also, keep in mind that you have
to use the single quotes for text fields (and memo), and
the pound signs for date/time fields.
Chris Nebinger