|
-
Jul 8th, 1999, 05:18 PM
#1
Thread Starter
Lively Member
Hi
I have a msaccess database that has 2 tables in it .One with customer
information and one with order information. I have a order entry form that
has text boxes for user input .What I want is the user to enter a telephone
number and press enter then have a SQL statment
to search for this phone number if it has a match then display the
results.Can anyone give me an example of the statment I would need to use?
thanks
Paul
------------------
-
Jul 8th, 1999, 05:31 PM
#2
New Member
For a table with fields Name, Address, Sex, Tel. No and we only want Name and Address we could use ..
strSQL as String
"SELECT Name, Address, TelNo " & _
"FROM MyUserTable WHERE " & _
"TelNo = '"+txtPhoneNo.Text+"'"
Should do the trick.
You may need to use format(txtPhoneNo.Text) depending on how the value is stored in your database, int vs string.
Daffy
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
|