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

Linking Tables

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have two separate Tables, How do I create a Form that can
retrieve data from these table? For example:
Employee Medical Information Database and financial information.

 
several options
1. create a query then a from based on the query
2. a form based on 1 table a sub form based on the other
3. unbound form then place the code into the tables using VBA.

hope this is what you had in mind. Just make sure that in either of the first 2 instances there is a index that links the 2 tables together. IE.. PatientID
 
This is pretty easy to do, just make sure you have a primary key set up for the main table(form) which will link to a foreign key in the secondary form. For example the main table has AcctNumber as the primary key. The secondary table should have a field AcctNum with the same data type. In the Database window, click the Relationships icon and link the AcctNumber fields in both tables. You establish either a one-to-one or one-to-many relationship. Then you create a query that includes fields from both tables that you need. Then in the form wizard you base a form off of that query. That should enable to create a form/subform approach.
 
Omega36,Braindead2...Thanks for your inputs. I create my main Form and be able to retrieve data from these 2 table by creating a query base on employee name...But How do I change the form to updateable. Now I can't edit any fields or even add new record to the main table.

Any suggestion,

thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top