A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Can't add records in form



 
 
Thread Tools Display Modes
  #1  
Old July 8th, 2004, 06:50 PM
DA
external usenet poster
 
Posts: n/a
Default 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  
Old July 9th, 2004, 07:42 AM
John Vinson
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 01:34 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.