|
-
September 1st, 2005, 07:59 AM
#1
String Search
Hi
We have a list of alpha-codes for families in a recordset that needs to be reduced given an alpha-code range, for example 'B' through 'M' or 'CA' to 'CS' or 'SAC' to SAX' or combinations of these three options. The user can use up to three characted for both the start and end parameters.
The current code is in VB for applications in Access 97 :
Set trst = db.OpenRecordset("SELECT * " & _
"FROM tbl_Display " & _
"WHERE ((tbl_Display.QCode)>=[Forms]![frm_Settings]![txt_Start_Char] " & _
"AND (tbl_Display.QCode)<=[Forms]![frm_Settings]![txt_End_Char])", dbOpenDynaset)
If the users enters Start Character = 'A' and End Character = 'A' the recordset returns no records even thought there may be 6 records starting with 'A'. If the start and end are 'A' and 'B' it returns only the 'A' records etc.
Any suggestions of how to code or why would be appreciated.
Last edited by Steve@GIHS; September 2nd, 2005 at 12:21 AM.
Reason: PRovide more details about problem.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|