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!

linking multiple tables to a single form

Status
Not open for further replies.

accessgoat

Programmer
Jul 23, 2002
15
US
HI
I have a form based on a query combining two tables with similar fields. The information from one table is displayed through uneditable textboxes to the user while another set of textboxes are provided for data entry to the user for entering data into the 2nd table. My problem is when I open the form, it locks the text boxes designed for data entry and the status bar indicates that the recordset is not updateable. Can anyone please suggest a way to resolve this? How can I link two tables to the same form?

Thanks,
 
Some queries are not updatable. Post the sql to your query here and maybe we can sort it out for you.

Jeremy =============
Jeremy Wallace
Designing, Developing, and Deploying Access Databases Since 1995

Take a look at the Developer's section of the site for some helpful fundamentals.
 
Thanks. This is the query which forms the source for the form I am creating.
SELECT tblA1Data.*, tblA2.OrgID, tblA2.MemberID, tblA2.AdmtDte, tblA2.PayDate
FROM tblA1Data LEFT JOIN tblA2 ON tblA1Data.OrgID = tblA2.OrgID;

I need to have the OrgID, MemberID, AdmitDate, PayDate displayed on the form, from tblA2, but not editable. I have another set of textboxes for the same fields but from tblA1Data for data entry. Data will be entered for matching OrgIDs.

Thanks again
 
Hmm. I'm confused. First off, you use the .* in there, so I can't see what fields are coming from tblA1Data. Do these tables have identical fields? What is in them? And how are they related?

Jeremy =============
Jeremy Wallace
Designing, Developing, and Deploying Access Databases Since 1995

Take a look at the Developer's section of the site for some helpful fundamentals.
 
HI
Both tables have identical fields. However only four of the fields from tblA2 (OrgID, MemberID, AdmitDate, PayDate) are displayed on the form. This is to help the user enter records into tblA2 with matching OrgID number from tblA2. The tblA1Data is empty and will be filled by the user. I hope this clarifies my question.

Thanks,
 
Well the thing best clarified here is that your table design needs some work! It's _almost always_ a bad idea to have duplicate tables, unless you're they're in different databases and one is an archive table.

What are you trying to accomplish by separating the records into two tables? There's most likely some characteristic that separates the records (Accepted/Not Accepted, or Alive/Dead, or something like that). Figure out what that is and make a fieled to hold something to distinguish between to two sets of data. Then put both of the tables together into one. This will make your life much easier.

When you'v done that, get back to this form, and come on back with more questions.

Jeremy =============
Jeremy Wallace
Designing, Developing, and Deploying Access Databases Since 1995

Take a look at the Developer's section of the site for some helpful fundamentals.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top