Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extracting From A Database

Status
Not open for further replies.

gjflash

Technical User
Nov 9, 2001
4
US
I am using Visual Basic 6.0
I created a data base in Visual Basic (MS Access 7 type)
I called the data base TPDB. Mdb
I called the table TP
I created three fields in the table
Field 1 Called Temp
Field 2 Called P1
Field 3 Called P2

--------------------Temp-----P1------P2

Record 1---------1---------- 6-------- 9
Record 2-------- 2-----------7--------10
Record 3---------3---------- 8--------11

In The Form
I created a text box 1 that I want to enter a number that I know is in the P1
Field
I created a text box 2 that I want the associated number from the Temp Field
to be recorded in.

I set the Data control Properties to read
Database Name =TPDB.Mdb
Recordset Type =Table
RecordSet Source= TP

I created a button and tried to write code to do the following.
Find Record where the P1 Field = Text1.Text (Example 7)
Place Number from Temp Field of same record in Text2.Text (Example 2)

Simple HUH
Not for this Novice

Please write simple code so I get the drift.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top