saving form data to tables via query

G

Guest

I have a form which reads data from a query joining two tables.

tbl1 has two fields, an autonumber and an integer
tbl2 has people information (name, address, etc.) and a link to the
autonumber in tbl1

the form shows the integer from tbl1 and all data from tbl2.

when I put the form in "new record" mode, I can create the integer field in
tbl1 but all of the remaining fields are locked on the form and I cannot add
the information. The form is not in dataentry mode by default. and the
button that puts it into add new record mode was created using the wizard
when the button was added to the form.

I am relatively sure this is a easy fix but it has been a long time since I
developed in Access.

Thanks in advance for any help you can provide.
 
J

John Vinson

I have a form which reads data from a query joining two tables.

tbl1 has two fields, an autonumber and an integer
tbl2 has people information (name, address, etc.) and a link to the
autonumber in tbl1

the form shows the integer from tbl1 and all data from tbl2.

when I put the form in "new record" mode, I can create the integer field in
tbl1 but all of the remaining fields are locked on the form and I cannot add
the information. The form is not in dataentry mode by default. and the
button that puts it into add new record mode was created using the wizard
when the button was added to the form.

I am relatively sure this is a easy fix but it has been a long time since I
developed in Access.

Thanks in advance for any help you can provide.

If one record in your first table can have multiple people associated
with it, the simplest approach is to use a Form based on the one table
with a Subform based on the people table.

If you really want to update the two-table query, be sure that the
Autonumber is defined as the Primary Key of the first table; that you
have a relationship defined between it and the Long Integer field in
the second table; and include BOTH fields in the query upon which the
form is based.

John W. Vinson[MVP]
 

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