S
Shiree
This is the last bit I need to finish a DB - its driving me mad.
I have a report - that I want to filter based on the record of the form.
It works perfectly fine for the unique ID Field [Asset Number]
But for the field that uses a combo box, I keep getting Error, please please
help!
Report is called R_Asset.
Field to match on is called [Sub Precinct]
If I swap the field name to [Asset number] this works perfectly
===================
The code is:
Private Sub RunReport2_Click()
Dim strDocName As String
Dim strWhere As String
strDocName = "R_Asset"
strWhere = "[sub precinct]=" & Me.[Sub precinct]
DoCmd.OpenReport strDocName, acPreview, , strWhere
End Sub
I have a report - that I want to filter based on the record of the form.
It works perfectly fine for the unique ID Field [Asset Number]
But for the field that uses a combo box, I keep getting Error, please please
help!
Report is called R_Asset.
Field to match on is called [Sub Precinct]
If I swap the field name to [Asset number] this works perfectly
===================
The code is:
Private Sub RunReport2_Click()
Dim strDocName As String
Dim strWhere As String
strDocName = "R_Asset"
strWhere = "[sub precinct]=" & Me.[Sub precinct]
DoCmd.OpenReport strDocName, acPreview, , strWhere
End Sub