-
How do I create SQL statement that lists all the records that selects the rightmost portion of a number in the listbox. For example, I have a few records for item number.
40000
50000
52000
55000
60000
I want to enter a number, 52000, in the textbox. This will select the righmost of 3 numbers of 52000. This will print 50000, 52000, and 55000 in the listbox. How do I do that? Thank you..
Merry Christmas to you all...
-
What do you mean by "rightmost 3 numbers"? Do you mean the value above it and the value below it? Do you mean anything beginning with a 5?
-
So you want anything that begins with the same first digit AND has the same last 3 characters?
Merry XMAS!
-
-
SQL = "Select * from MyTable where MyDataField LIKE " & left(clng(text1.text), 1) & "*" & right(clng(text1.text), 3)
HTH
Tom
-
"rightmost 3 numbers" means the last 3 places of a number I enter. Yes, I want all records that start with the number "5" or any number. For instance, the statement is
Right$(txtItemNumber.Text1, 3) = "000"
It gets the rightmost 3 places (000) of that number. If I want to enter 50000 in the textbox, it prints 50000, 52000, 55000 in the listbox. How do I create an SQL statement...? I use DAO for working with the database. Thank you for responding .... Clunietp
Have a Merry Christmas to you all!