|
-
Nov 29th, 2002, 05:19 AM
#1
Thread Starter
Addicted Member
linking 2 tables 2 fields (dbase newbie)
i have 2 tables , GUAGES and GUAGE RECORDS. The Common Key on Both Tables is 'guage number'.
I also have 2 forms.. The first form displays the guage data for each guage, and the second form displays the
guage calibration records for each individual guage.
The 'guage number' field (Primary key) is in form1.text1.text. So to view the corresponding guage record
calibration data from the Guage Records table i use the following SQL
Dim strSQL As String
strSQL = "Select * From GuageRecords Where [Guage number] = " & "'" & Form1.Text1.Text & "'"
Data1.Recordsource = strSQL
Data1.Refresh
Data1.UpdateControls
The problem is that i have created another 2 tables, again both have the guage number field, They both have a
Calibration Number field aswell.
What would be the Equivalent SQL statement to enable me to view records that have both the same Guage AND
Calibration Numbers.
Indeed many Guages have the same calibration numbers, so i need the guage number to view the calibration number
for the specific guage.
Any help would be greatly appreciated.
-
Nov 29th, 2002, 06:33 AM
#2
Frenzied Member
Something like this you mean?
VB Code:
strSQL = "Select * From GuageRecords Where [Guage number] = '" & Form1.Text1.Text & "' AND [Calibration number] = '" & Form1.Text2.Text & "'"
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
|