Query results allowing edits

Stacey

Registered User.
Local time
Today, 12:45
Joined
Sep 10, 2002
Messages
84
I have 2 related tables. The form to enter new data into the tables is set up with a subform for the second table. I want to allow the user to query for a specific record, have it display in a form that looks exactly like the data entry form, and be able to update the tables from that. I first tried an exact copy of the data entry form, using a subform for the second table. It allows me to update the 2nd table from the query results displayed, but won't allow updates to the main form. So then I tried just doing one form with all the results displayed, no subform, but then it won't allow me to update ANYTHING.

What am I doing wrong? Any help is appreciated.

Thanks
Stacey
 
Stacey, here are a few notes that might help you in deciding what to do...
I have 2 related tables. The form to enter new data into the tables is set up with a subform for the second table. I want to allow the user to query for a specific record, have it display in a form that looks exactly like the data entry form, and be able to update the tables from that.
To do this, create a query (with criteria if need be), and base a separate form off of that.
I first tried an exact copy of the data entry form, using a subform for the second table. It allows me to update the 2nd table from the query results displayed, but won't allow updates to the main form.
One note that may be relevant here...

* I don't think you can edit information in the records of recordsets that are associated with the a child table in a one-to-many relationship (with referencial integrity enforced).
Sothen I tried just doing one form with all the results displayed, no subform, but then it won't allow me to update ANYTHING.
If you have just queried every field from both of your tables that are part of a relationship, you are not able to update records because the changes that you make will violate the referential integrity rules of the relationship (if that is present). In other words, your changes would cause a record on the MANY side to have NO record on the ONE side. That is a violation of relationship integrity rules.

Anyway, I hope some of these comments help!
 

Users who are viewing this thread

Back
Top Bottom