|
-
Dec 24th, 1999, 12:32 PM
#1
Thread Starter
New Member
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...
-
Dec 24th, 1999, 02:28 PM
#2
Guru
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?
-
Dec 25th, 1999, 01:02 AM
#3
Guru
So you want anything that begins with the same first digit AND has the same last 3 characters?
Merry XMAS!
-
Dec 25th, 1999, 01:31 AM
#4
Thread Starter
New Member
-
Dec 25th, 1999, 12:27 PM
#5
Guru
SQL = "Select * from MyTable where MyDataField LIKE " & left(clng(text1.text), 1) & "*" & right(clng(text1.text), 3)
HTH
Tom
-
Dec 25th, 1999, 12:51 PM
#6
Thread Starter
New Member
"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!
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
|