Hello,
After searching and searching, I have not been able to find the answer I need and I was hoping that someone would either lead me to the right thread or help a brother out...
I am on Access2003 and I have a continuous form with data culled from a table that lists services. It's a pretty simple table that has a PK, name of service, and a date of service. I put two unbound text boxes to filter the records for specific date ranges. So for the first text box, which would be the one that filters for start date, I wrote something like this:
Private Sub Text10_AfterUpdate()
Dim stStartdate as String
stStartdate = stStartdate & "([servicedate] >= " & Me.Text10 & ")"
Me.Filter = stStartdate
Me.FilterOn = True
End Sub
When I enter a date into Text10 (it has been formatted to Short date and returns a US based date system, which is correct) and press tab or enter, it turns the filter on but filters nothing.
Then I tried:
stStartdate = stStartdate & "([servicedate] >= "" & Me.Text10 & "")"
and got the ole Run-time error 2001
Then I tried:
stStartdate = stStartdate & "([servicedate] >= ""*" & Me.Text10 & "*"")"
and got he same error
What am I doing wrong?
After searching and searching, I have not been able to find the answer I need and I was hoping that someone would either lead me to the right thread or help a brother out...
I am on Access2003 and I have a continuous form with data culled from a table that lists services. It's a pretty simple table that has a PK, name of service, and a date of service. I put two unbound text boxes to filter the records for specific date ranges. So for the first text box, which would be the one that filters for start date, I wrote something like this:
Private Sub Text10_AfterUpdate()
Dim stStartdate as String
stStartdate = stStartdate & "([servicedate] >= " & Me.Text10 & ")"
Me.Filter = stStartdate
Me.FilterOn = True
End Sub
When I enter a date into Text10 (it has been formatted to Short date and returns a US based date system, which is correct) and press tab or enter, it turns the filter on but filters nothing.
Then I tried:
stStartdate = stStartdate & "([servicedate] >= "" & Me.Text10 & "")"
and got the ole Run-time error 2001
Then I tried:
stStartdate = stStartdate & "([servicedate] >= ""*" & Me.Text10 & "*"")"
and got he same error
What am I doing wrong?