|
-
Oct 31st, 2001, 05:52 AM
#1
Thread Starter
New Member
Retrieving records
Hi all
I am almost sure someone will be able to help me out with the following problem:
I have 3 text boxes that pull info from a database. What needs to happen is that in the first text box the user will type in a number. Next using the number from the first text box the database will find the record and display info in the other two text boxes.
What I need to know is how do I get the app to search the database from the info in the first text box and then display the record information in the other two text boxes ?
Sorry. I am using ADO to connect to a database called parts that has 3 feilds ie: Part number, description and price.
Please help.
Thanks.
Last edited by bdanney; Oct 31st, 2001 at 06:43 AM.
Without fear there can be no courage !
-
Oct 31st, 2001, 06:40 AM
#2
Fanatic Member
Problem
Firstly, I would suggest that this problem should have been posted in the Database Development forum.
Secondly, what database access method are you using (i.e. DAO, ADO etc.)?
Thirdly, what database are you connecting to?
Presumably, you will need to open a recordset with criteria that is taken from the first text box.
Your code might look something like this:
Code:
Set rs = New Recordset
rs.Open "SELECT Field2, Field3 FROM Table1 WHERE Field1 = '" & Text1.Text & "'"
Text2.Text = rs!Field2
Text3.Text = rs!Field3
Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment. 
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
|