search on forms

  • Thread starter Thread starter net
  • Start date Start date
N

net

Would like some help in what code I would need to place
behind the onclick event of a button on my form to do the
following. I would like to do a search from two textboxes
startdate and end date, so when user types in startdate
and enddate it would show the results in my SearchFrm. I
have a field in my table called date and also on the
inital req form that is automatically populated once user
open form. Dates are stored in medium format Eg: 03-Mar-04

Thanks for the help
 
Use the following code:
Dim strFilter As String
strFilter = "[Date] >= #" Me.StartDate & "# And [Date]
<= " & Me.EndDate & "#"
Me.Filter = strFilter
Me.Filteron = True

P.S.
By naming your field "Date" your out for trouble since
its a reserved word.
 
Back
Top