G
Guest
Code
Private Sub CmdOK_Click(
On Error GoTo Err_CmdOK_Clic
Dim strWhere As Strin
Dim strLink As Strin
If Len(Me.CmbFilter & vbNullString) = 0 The
MsgBox "Please select one of the options.", vbInformation, "Selection Required
ElseIf Me.CmbFilter = "See All" The
DoCmd.OpenForm "Web Status Clients Form Test New Filter
DoCmd.Close acForm, "Web Status Clients Search Form w Filters
ElseIf Me.CmbFilter = "Filter By.." The
If Not IsNull(Me.CmbRegions) The
strWhere = strWhere & strLink & "Regions=""" & CmbRegions & """
strLink = " And
End I
If Not IsNull(Me.CmbActivity) The
strWhere = strWhere & strLink & "Activity Ranking=""" & CmbActivity & """
strLink = " And
End I
DoCmd.OpenForm "Web Status Clients Form Test New Filter", acNormal, , strWher
DoCmd.Close acForm, "Web Status Clients Search Form w Filters
End I
Exit_CmdOK_Click
Exit Su
Err_CmdOK_Click
MsgBox Err.Descriptio
Resume Exit_CmdOK_Clic
End Su
Problem: Syntax error (missing operator) in query expression 'Regions="Chicago" And Activity Ranking="1"'
It seemed to work fine when I had it just Regions but for a combination, I am unable to get it to work
Thank you!
Private Sub CmdOK_Click(
On Error GoTo Err_CmdOK_Clic
Dim strWhere As Strin
Dim strLink As Strin
If Len(Me.CmbFilter & vbNullString) = 0 The
MsgBox "Please select one of the options.", vbInformation, "Selection Required
ElseIf Me.CmbFilter = "See All" The
DoCmd.OpenForm "Web Status Clients Form Test New Filter
DoCmd.Close acForm, "Web Status Clients Search Form w Filters
ElseIf Me.CmbFilter = "Filter By.." The
If Not IsNull(Me.CmbRegions) The
strWhere = strWhere & strLink & "Regions=""" & CmbRegions & """
strLink = " And
End I
If Not IsNull(Me.CmbActivity) The
strWhere = strWhere & strLink & "Activity Ranking=""" & CmbActivity & """
strLink = " And
End I
DoCmd.OpenForm "Web Status Clients Form Test New Filter", acNormal, , strWher
DoCmd.Close acForm, "Web Status Clients Search Form w Filters
End I
Exit_CmdOK_Click
Exit Su
Err_CmdOK_Click
MsgBox Err.Descriptio
Resume Exit_CmdOK_Clic
End Su
Problem: Syntax error (missing operator) in query expression 'Regions="Chicago" And Activity Ranking="1"'
It seemed to work fine when I had it just Regions but for a combination, I am unable to get it to work
Thank you!