Good Morning
I am having trouble opening a datasheet form with mulitple where clauses here the VB that I have so far
-------------------
Private Sub Command192_Click()
If IsNull(Me.Startdate) = True Or IsNull(Me.Enddate) = True Or Startdate = "" Or Enddate = "" Then
MsgBox "Start AND End dates are required" '
Exit Sub '
ElseIf Startdate > Enddate Then
MsgBox "Start Date cannot be later than End Date"
Exit Sub '
Else
DoCmd.Openform "Summarys", acNormal, , ("[Incident Date] Between #" & Format(Me.Startdate, "MM/DD/YYYY") & "# And #" & Format(Me.Enddate, "MM/DD/YYYY") & "#" & "'" & " " And " & ([Location] = '" & "Avon Hall" & "'" And " & ([Location] = '" & "Regency Hall" & "')"), acFormReadOnly
DoCmd.Close acForm, "Search Reports"
End If
End Sub
-----------
At the park for the openform I recieve a Mismatch error 13 have trie serveral different ways by all fail any suggestions would be greatfull
Thanks
I am having trouble opening a datasheet form with mulitple where clauses here the VB that I have so far
-------------------
Private Sub Command192_Click()
If IsNull(Me.Startdate) = True Or IsNull(Me.Enddate) = True Or Startdate = "" Or Enddate = "" Then
MsgBox "Start AND End dates are required" '
Exit Sub '
ElseIf Startdate > Enddate Then
MsgBox "Start Date cannot be later than End Date"
Exit Sub '
Else
DoCmd.Openform "Summarys", acNormal, , ("[Incident Date] Between #" & Format(Me.Startdate, "MM/DD/YYYY") & "# And #" & Format(Me.Enddate, "MM/DD/YYYY") & "#" & "'" & " " And " & ([Location] = '" & "Avon Hall" & "'" And " & ([Location] = '" & "Regency Hall" & "')"), acFormReadOnly
DoCmd.Close acForm, "Search Reports"
End If
End Sub
-----------
At the park for the openform I recieve a Mismatch error 13 have trie serveral different ways by all fail any suggestions would be greatfull
Thanks