Help with Filter Form

  • Thread starter Thread starter Elvis72
  • Start date Start date
E

Elvis72

I have this code for one of my text boxes:

If Not IsNull(Me.txtfirstname) Then
strWhere = strWhere & "([First Name] Like ""*" & Me.txtfirstname &
"*"") AND "
End IF

Now, I need to make one that can handle a range of numbers.

I have the following field:

Years Experience

They need to be able to type in

Years Experience
Minimum: 5
Maximum: 25

And it bring up all records that have between 5-25 years of experience.

Any help?
 
Elvis72 said:
I have this code for one of my text boxes:

If Not IsNull(Me.txtfirstname) Then
strWhere = strWhere & "([First Name] Like ""*" & Me.txtfirstname &
"*"") AND "
End IF

Now, I need to make one that can handle a range of numbers.

I have the following field:

Years Experience

They need to be able to type in

Years Experience
Minimum: 5
Maximum: 25

And it bring up all records that have between 5-25 years of experience.


If Not IsNull(Me.txtMinExp Or Not IsNull(Me.txtMacExp) Then
strWhere = strWhere & "(Experience Between " _
& Nz(Me.txtMinExp, 0) & " And " & Nz(Me.txtMaxExp, 99) _
& ") AND "
 
Back
Top