G
Guest
I wish to pass a where statement to open a report.
I currently have
Dim strInput As String
strInput = "[Company Query]!PostalCode = '" & Me.txtadd & "'"
DoCmd.OpenReport "Company Report", acViewPreview, , strInput
this works fine.
however i wish to adjust this code to use the where statement to search for
anything begning with Me.txtadd
i gather that i need to use LIKE instead of equals and put * in at the end.
however all the commas are causing me problems
any advice??
I currently have
Dim strInput As String
strInput = "[Company Query]!PostalCode = '" & Me.txtadd & "'"
DoCmd.OpenReport "Company Report", acViewPreview, , strInput
this works fine.
however i wish to adjust this code to use the where statement to search for
anything begning with Me.txtadd
i gather that i need to use LIKE instead of equals and put * in at the end.
however all the commas are causing me problems
any advice??