Sorry for disturb!
I need to open a report from a current form with two where conditions; first is numeric and the second is string.
DoCmd.OpenReport ("abc"), acViewPreview , , (where condition)
Thanks in advance
It is easiest to build complex strings in variables so you can have an easy way to print them to the debug windo if you have trouble.
Code:
Dim strWhere as String
strWhere = "fld1 = '" & Me.textfield & "' AND fld2 =" & Me.numericfield
This assumes that the text field does not contain embed single quotes. If the text field is a name then the embedding of the double quotes gets more complicated. In all my apps I create a constant named QUOTE