Anyone Know VB?

yeah i know its not really used much now but i made a database using Access97 (in know its ancient but you have to see the computer im using =P) at work that has all our client details on it. When i was half way through making it i made a new form that was basically a search form, i can search for pretty much everything in the database and it works great.
Anyways back to what i was wanting...
i have a field in the database that has the box number that teh files are being stored in when they are dead filed.
thing is though i now need to add a criteria in the search form that will display the files in a range of boxes (i.e i need to display the files that in boxes 1-100) ive been wracking my brains on the code for it. Annoying thing about it is i actually already have a search criteria in the search for that will display the clients that files between 2 dates but i cant seem to figure out what the code is for between 2 numbers.
since its been about 7-8 years since i actually looked learned most of this stuff i was wondering if anyone else could help me.
The code i used for the date one is relatively simple its in bold near the bottom, i just cant seem to change it from date to number =|
Function fSubSQL()
Dim strSQL As String
strSQL = "SELECT * FROM tblClients "
strWhere = " ClientID Is Not Null "
If Not IsNull(Me("ClientSurname")) Then
strWhere = strWhere & " AND ClientSurname Like ""*" & Me("ClientSurname") & "*"""
End If
If Not IsNull(Me("ClientForename")) Then
strWhere = strWhere & " AND ClientForename Like ""*" & Me("ClientForename") & "*"""
End If
If Not IsNull(Me("ClientRef")) Then
strWhere = strWhere & " AND ClientRef Like ""*" & Me("ClientRef") & "*"""
End If
If Not IsNull(Me("OurFileNo")) Then
strWhere = strWhere & " AND OurFileNo Like ""*" & Me("OurFileNo") & "*"""
End If
If Not IsNull(Me("Matter")) Then
strWhere = strWhere & " AND Matter Like ""*" & Me("Matter") & "*"""
End If
If Not IsNull(Me("Address")) Then
strWhere = strWhere & " AND Address Like ""*" & Me("Address") & "*"""
End If
If Not IsNull(Me("FeeEarner")) Then
strWhere = strWhere & " AND FeeEarner Like ""*" & Me("FeeEarner") & "*"""
End If
If Not IsNull(Me("Status")) Then
strWhere = strWhere & " AND Status Like ""*" & Me("Status") & "*"""
End If
If Not IsNull(Me("Category")) Then
strWhere = strWhere & " AND Category Like ""*" & Me("Category") & "*"""
End If
If Not IsNull(Me("txtFrom")) Then
strWhere = strWhere & " AND OurFileDate >= #" & Format(Me("txtFrom"), "mm/dd/yy") & "#"
End If
If Not IsNull(Me("txtUntil")) Then
strWhere = strWhere & " AND OurFileDate <= #" & Format(Me("txtUntil"), "mm/dd/yy") & "#"
End If
If Not IsNull(Me("txtFromDF")) Then
strWhere = strWhere & " AND DeadFileDate >= #" & Format(Me("txtFromDF"), "mm/dd/yy") & "#"
End If
If Not IsNull(Me("txtUntilDF")) Then
strWhere = strWhere & " AND DeadFileDate <= #" & Format(Me("txtUntilDF"), "mm/dd/yy") & "#"
End If
If Not IsNull(Me("txtFromDest")) Then
strWhere = strWhere & " AND DestroyDate >= #" & Format(Me("txtFromDest"), "mm/dd/yy") & "#"
End If
If Not IsNull(Me("txtUntilDest")) Then
strWhere = strWhere & " AND DestroyDate <= #" & Format(Me("txtUntilDest"), "mm/dd/yy") & "#"
End If
fSubSQL = strSQL & " WHERE " & strWhere & " ORDER BY ourfiledate DESC"
Debug.Print strSQL
End Function
Anyways back to what i was wanting...
i have a field in the database that has the box number that teh files are being stored in when they are dead filed.
thing is though i now need to add a criteria in the search form that will display the files in a range of boxes (i.e i need to display the files that in boxes 1-100) ive been wracking my brains on the code for it. Annoying thing about it is i actually already have a search criteria in the search for that will display the clients that files between 2 dates but i cant seem to figure out what the code is for between 2 numbers.
since its been about 7-8 years since i actually looked learned most of this stuff i was wondering if anyone else could help me.
The code i used for the date one is relatively simple its in bold near the bottom, i just cant seem to change it from date to number =|
Function fSubSQL()
Dim strSQL As String
strSQL = "SELECT * FROM tblClients "
strWhere = " ClientID Is Not Null "
If Not IsNull(Me("ClientSurname")) Then
strWhere = strWhere & " AND ClientSurname Like ""*" & Me("ClientSurname") & "*"""
End If
If Not IsNull(Me("ClientForename")) Then
strWhere = strWhere & " AND ClientForename Like ""*" & Me("ClientForename") & "*"""
End If
If Not IsNull(Me("ClientRef")) Then
strWhere = strWhere & " AND ClientRef Like ""*" & Me("ClientRef") & "*"""
End If
If Not IsNull(Me("OurFileNo")) Then
strWhere = strWhere & " AND OurFileNo Like ""*" & Me("OurFileNo") & "*"""
End If
If Not IsNull(Me("Matter")) Then
strWhere = strWhere & " AND Matter Like ""*" & Me("Matter") & "*"""
End If
If Not IsNull(Me("Address")) Then
strWhere = strWhere & " AND Address Like ""*" & Me("Address") & "*"""
End If
If Not IsNull(Me("FeeEarner")) Then
strWhere = strWhere & " AND FeeEarner Like ""*" & Me("FeeEarner") & "*"""
End If
If Not IsNull(Me("Status")) Then
strWhere = strWhere & " AND Status Like ""*" & Me("Status") & "*"""
End If
If Not IsNull(Me("Category")) Then
strWhere = strWhere & " AND Category Like ""*" & Me("Category") & "*"""
End If
If Not IsNull(Me("txtFrom")) Then
strWhere = strWhere & " AND OurFileDate >= #" & Format(Me("txtFrom"), "mm/dd/yy") & "#"
End If
If Not IsNull(Me("txtUntil")) Then
strWhere = strWhere & " AND OurFileDate <= #" & Format(Me("txtUntil"), "mm/dd/yy") & "#"
End If
If Not IsNull(Me("txtFromDF")) Then
strWhere = strWhere & " AND DeadFileDate >= #" & Format(Me("txtFromDF"), "mm/dd/yy") & "#"
End If
If Not IsNull(Me("txtUntilDF")) Then
strWhere = strWhere & " AND DeadFileDate <= #" & Format(Me("txtUntilDF"), "mm/dd/yy") & "#"
End If
If Not IsNull(Me("txtFromDest")) Then
strWhere = strWhere & " AND DestroyDate >= #" & Format(Me("txtFromDest"), "mm/dd/yy") & "#"
End If
If Not IsNull(Me("txtUntilDest")) Then
strWhere = strWhere & " AND DestroyDate <= #" & Format(Me("txtUntilDest"), "mm/dd/yy") & "#"
End If
fSubSQL = strSQL & " WHERE " & strWhere & " ORDER BY ourfiledate DESC"
Debug.Print strSQL
End Function