If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Can't add records in form
I'm stuck! I created this fantastic form with 2 subforms
but now I can't enter any data. The main form is based on a Company table and it gets the CompanyName from there. The first subform is based on a query that links Company.CompanyName with AgreementHistory.CompanyName and then the second sunform also based on the query is linked to the first subform by AgreementID autonumber. Now I can't add any records to the subforms. Error is "cannot add records(s); join key of table tblAgreementHistory not in recordset". My subform were originally based directly on the table but I couldn't sort on one of the fields so I changed it to a query. Help! |
#2
|
|||
|
|||
Can't add records in form
On Thu, 8 Jul 2004 10:50:08 -0700, "DA"
wrote: I'm stuck! I created this fantastic form with 2 subforms but now I can't enter any data. The main form is based on a Company table and it gets the CompanyName from there. The first subform is based on a query that links Company.CompanyName with AgreementHistory.CompanyName and then the second sunform also based on the query is linked to the first subform by AgreementID autonumber. Now I can't add any records to the subforms. Error is "cannot add records(s); join key of table tblAgreementHistory not in recordset". My subform were originally based directly on the table but I couldn't sort on one of the fields so I changed it to a query. Help! Two suggestions: - Base the Subforms, not on a query joining the mainform's table to the related table, but just to the related table. It is not necessary - and in fact can cause problems - to have the main table represented twice, once on the form and once in the subform. - If you DO use the query, open the query in design view and make sure that BOTH Company.CompanyName *and also* AgreementHistory.CompanyName are selected into the query grid; do the same with AgreementID - include both instances. John W. Vinson[MVP] Come for live chats every Tuesday and Thursday http://go.compuserve.com/msdevapps?loc=us&access=public |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Searching Records | Melissa Lambino | New Users | 6 | July 20th, 2004 04:51 AM |
Showing multiple records on one page of a form | Design by Sue | General Discussion | 0 | June 17th, 2004 02:20 PM |
Form doesn't pull up records from table | Ed Burns | Using Forms | 3 | June 8th, 2004 07:41 PM |
display continuous records side by side on form | Andi Lee Davis | New Users | 2 | May 21st, 2004 02:01 PM |
Form Doesn't Go To New Record | Steve | New Users | 15 | May 16th, 2004 04:33 PM |