I did think this problem was behind me, but its bounced back. I am trying to build a user selection list of records against an input box.
Records in the table are similar to:
01000000
00100678
00012300
00611100
etc
The numbers are text. I am trying to make it so if a 1 was entered in the search box, records 01000000,00100678,00012300 would appear in the listbox. If a 2 followed the 1, ie 12, then only record 00012300 would appear, furthermore if just a 6 were entered then only record 00611100 would appear.
I have tried using Val, etc, but am not getting anywhere.
This code only shows a record when its totally matched.
SELECT TXMASTERS.ID1, Val(Right([Barcode],9)) AS [AT]
FROM TXMASTERS
WHERE (((Val(Right([Barcode],9))) Like Val([FORMS]![MainForm1].[LNAME].[CAPTION])));
I am putting the textbox value into a label for ease of seeing whats going on, as 3 alphanumeric letters get stripped from the record numbers searched for. Many thanks
Records in the table are similar to:
01000000
00100678
00012300
00611100
etc
The numbers are text. I am trying to make it so if a 1 was entered in the search box, records 01000000,00100678,00012300 would appear in the listbox. If a 2 followed the 1, ie 12, then only record 00012300 would appear, furthermore if just a 6 were entered then only record 00611100 would appear.
I have tried using Val, etc, but am not getting anywhere.
This code only shows a record when its totally matched.
SELECT TXMASTERS.ID1, Val(Right([Barcode],9)) AS [AT]
FROM TXMASTERS
WHERE (((Val(Right([Barcode],9))) Like Val([FORMS]![MainForm1].[LNAME].[CAPTION])));
I am putting the textbox value into a label for ease of seeing whats going on, as 3 alphanumeric letters get stripped from the record numbers searched for. Many thanks