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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

linking access tables through code

Status
Not open for further replies.

fenris

Programmer
May 20, 1999
824
CA
I can create an access CB with a bunch of tables and all kinds of fields. My problem is That I can't figure out how to link two tables based on a common field, specifically an id key.

For example, say I have table A and table B. Table A has a primary key. Now I want to have a field in table B that corresponds the the primary key in table A. I am using adox (I think that is what it is as I don't have my code readily available).



Troy Williams B.Eng.
fenris@hotmail.com

 
The SQL Statement for linking the two tables is as follows:
SELECT tableA.fieldname(s), tableB.fieldname(s)
FROM tableA INNER JOIN tableB ON tableA.primarykeyfield = tableB.foreignkeyfield
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top