forms_are_nightmares
Registered User.
- Local time
- Today, 12:53
- Joined
- Apr 5, 2010
- Messages
- 71
Hope someone can help as my eyes are going cross...
Scenario:
Have multiple combo boxes (filters) that are triggered when a user runs a report. All work correctly. the ability to add a date range was requested. I searched this forum and found a link to allen browne's site. I added the code and I get a syntax error on the following code (I attached a screen shot of the error):
If IsDate(Me.txtStartDate) Then
sWhere = "(" & strDateField & " >= " & Format(Me.txtStartDate, strcJetDate) & ") "
End If
If IsDate(Me.txtEndDate) Then
If sWhere <> vbNullString Then
sWhere = sWhere & " AND "
End If
sWhere = sWhere & "(" & strDateField & " < " & Format(Me.txtEndDate + 1, strcJetDate) & ") "
End If
Thanks...
Scenario:
Have multiple combo boxes (filters) that are triggered when a user runs a report. All work correctly. the ability to add a date range was requested. I searched this forum and found a link to allen browne's site. I added the code and I get a syntax error on the following code (I attached a screen shot of the error):
If IsDate(Me.txtStartDate) Then
sWhere = "(" & strDateField & " >= " & Format(Me.txtStartDate, strcJetDate) & ") "
End If
If IsDate(Me.txtEndDate) Then
If sWhere <> vbNullString Then
sWhere = sWhere & " AND "
End If
sWhere = sWhere & "(" & strDateField & " < " & Format(Me.txtEndDate + 1, strcJetDate) & ") "
End If
Thanks...