saving record

C

Chris

Hello,

I have a form based on a query (combining different tables in it: major
table with article data and several smaller tables with data I refer to in
my major table). When trying to go to a next record while filling in the
form, I get an error message telling me that I can't add or save a record
because a related record is required in a table I use in my query. This
happens for several tables (in fact for every smaller table in my query).
When I fill in the data, the record is eventually saved. How can I avoid
these error screens, i.e. not having to fill in the fields?

When I close the form by clicking a button before all the required fields
are filled in, I don't get the error messages but my record isn't saved. How
come?

Is this making sense and if so, HELP!!

Chris
 
G

GVaught

Generally when combining multiple tables into a query you basic invoke that
query into a read only query. This type of query can not be attached to a
form.

What you need to do is ensure that the major table has a relationship with
your smaller tables. In other words the primary key of the main table has to
be reflected in the smaller tables in addition to their own primary keys or
if only one table is related to the main table, then the remaining smaller
tables must reflect the primary key of the 1st subform's table. If you are
not familiar with referential integrity, normalization, and building
relationships between tables, I suggest you read up on these items first. A
search on the web will produce the necessary topics.

Once you get all the relationships set, then create a main form / subform
against your tables.

Hope this helps and sheds some light.
 
C

Chris

Thanks,

it was in fact a relational problem (referential integrity) that caused the
problems.

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top