Hi All,
I am trying to run the below code but I am getting the MS Access can't find object on this line
from the code below. I just can't seem to figure out what I am doing wrong. Any help is appreciated..... thanks
I am trying to run the below code but I am getting the MS Access can't find object on this line
Code:
DoCmd.OpenQuery "SELECT * FROM PROV_CL WHERE [Address 1] LIKE '*" & strInputBox & "*'", acViewNormal
Code:
Private Sub cmdPreview_Click()
Dim strInputBox As String
Select Case cmbReports
Case "Darin Bad Address"
DoCmd.OpenQuery "Rpt_Darin_Bad_Address", acViewNormal
Case "MMDM Bad Address"
DoCmd.OpenQuery "Rpt_MMDM_Bad_Address", acViewNormal
Case "Lookup Darin Address"
strInputBox = InputBox("Please Enter an Address or Partial Address for lookup", "Address Lookup")
DoCmd.OpenQuery "SELECT * FROM PROV_CL WHERE [Address 1] LIKE '*" & strInputBox & "*'", acViewNormal
End Select
End Sub