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

Cannot add or change a record

Status
Not open for further replies.

lpgagirl

Technical User
Feb 3, 2003
202
0
0
CA
I have a form that runs from a query. The query is based on three tables; main, personal information and preparedness. The tables are linked via a primary key, main = autonumber and the other two are numbers. The form is used to search/edit/add contact information by users. I can add/edit anything in the main portion of the form and the personal information portion of the form however, when I attempt to add information to the preparedness portion of the form I get the following message "You cannot add or change a record because a related record is required in table 'Main'". If I delete the entire record and re-enter all the information as a new record I am able to add in to the preparedness portion. Re-entering all the records is not an option. Please help. If you require further details let me know.

Jeannie
 
Jeannie,

This is a repeat post, isn't it. You cannot add records to a complex query!!!!! Open the underlying tables and add the records. You know how to do that. The compiler DOES NOT!


rollie@bwsys.net
 
This form is used for data entry by many users who do not have the option of opening the tables and adding information.

Why so angry? The last post did not answer the question for me...so I thought I would try again. Please be patient with those who may not have as much experience in Access as you do. I have appreciated your help in the past and personally I am glad that you are willing to share it with people like myself who continue to learn every day.

Thanks.


Jeannie
 
It appeared the last post was ignored. Consider the query and how the compiler is going to 'know' where to put your data. You know where but it does not! Open another special form and put the data in that one - a simple bound form and then requery the original form. When an addition to a query requires the orig table to generate an autonumber and tell that to another form, it just cannot know enough to do that.

Sorry, I will stop responding to your posts if I am not helping.

Rollie E
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top