I have a table with a column of 12 digits ECS000000000
I am trying to do a like query to fill a listbox.
It only seems to list records when the numbers are 4 digits from the end, probably due to my having a VAL in the query, but I cannot locate by search ECS111111111
Query in list is:
SELECT DISTINCT Table1.Barcode, Val(Right([Barcode] & '',9)) AS [Tape Number], Table1.ID1
FROM Table1 INNER JOIN Table2 ON Table1.ID1 = Table2.ID1
WHERE (((Val(Right([Barcode] & '',9))) Like [forms]![Form1B].[Form].[LNAME].[Caption]))
ORDER BY Table1.Barcode;
Any ideas why its not working. Many Thanks
I am trying to do a like query to fill a listbox.
It only seems to list records when the numbers are 4 digits from the end, probably due to my having a VAL in the query, but I cannot locate by search ECS111111111
Query in list is:
SELECT DISTINCT Table1.Barcode, Val(Right([Barcode] & '',9)) AS [Tape Number], Table1.ID1
FROM Table1 INNER JOIN Table2 ON Table1.ID1 = Table2.ID1
WHERE (((Val(Right([Barcode] & '',9))) Like [forms]![Form1B].[Form].[LNAME].[Caption]))
ORDER BY Table1.Barcode;
Any ideas why its not working. Many Thanks