Urgent help needed! I have attached the code so, you can help me. thanks

M

Mike Saifie

I get error when I run this code to search inbetween the dates. Any advsie
pl.

' If Opened Date From
'If IsDate(Me.OpenedDateFrom) Then
' Add it to the predicate - exact
' strWhere = strWhere & " AND " & "[Issues.Opened Date] >= " &
GetDateFilter(Me.OpenedDateFrom)
' ElseIf Nz(Me.OpenedDateFrom) <> "" Then
' strError = cInvalidDateError
'End If

' If Opened Date To
'If IsDate(Me.OpenedDateTo) Then
' Add it to the predicate - exact
' strWhere = strWhere & " AND " & "Issues.[Opened Date] <= " &
GetDateFilter(Me.OpenedDateTo)
' ElseIf Nz(Me.OpenedDateTo) <> "" Then
'strError = cInvalidDateError
' End If

this is where it highlits when I click on debug

Me.Browse_All_Issues.Form.Filter = strWhere
 
D

Douglas J. Steele

All of the code you posted (with the exception of the code you said is
highlighted) is commented out. If it's actually commented out in your
application, there's no way it can be causing any problems!

What are you trying to do? If I had to guess, I'd say you're trying to set a
filter on a subform. Is the name of the subform container on the form where
this code is contained Browse_All_Issues? It's the name of the subform
container that matters, not the name of the form being used as a subform.

What does GetDateFilter return? Hopefully it's a string that puts # around
your dates.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top