I am trying filter my query from a form to print a report.
The orignal query includes all the counties field = [County]
I would like to click on a certain command button on my form and only show
counties that equal ESSEX ...
I have this code so far but it will still show all counties in my report..
most likey the error is in here ?? stWhere = "[County] = ESSEX"
The orignal query includes all the counties field = [County]
I would like to click on a certain command button on my form and only show
counties that equal ESSEX ...
I have this code so far but it will still show all counties in my report..
most likey the error is in here ?? stWhere = "[County] = ESSEX"
PHP:
Private Sub ActiveEssex_Click()
On Error GoTo Err_ActiveEssex_Click
Dim stDocName As String
Dim stWhere As String
stDocName = "001 - Status Report 1 - General - Active"
stWhere = "[County] = ESSEX"
DoCmd.OpenReport stDocName, acPreview, stWhere
DoCmd.Maximize
Exit_ActiveEssex_Click:
Exit Sub
Err_ActiveEssex_Click:
MsgBox Err.Description
Resume Exit_ActiveEssex_Click
End Sub