How do I put data into 2 tables from a single form in Access?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have two tables, Membership and Board, into which I want to enter data from
one form. When I try to place a text box on this form with a control source
other than the table the form was set up for, it doesn't work and no data
goes to the second table. If I ry to use the form wizard when I select a
second table, it makes a subform, which I don't want.

How do I get data into two tables from one form?

Thanks, Walt
 
Hi Walt,

Use un-bound controls on the form and vba to write the records,

e.g.

cmdSave is a button

cmdSave_Click event

{open first table}
{add new record}
{get data from the textboxes on the form}
{update the record}
{close first table}
{open second table}
{add new record}
{get data from the textboxes on the form}
{update the record}
{close second table}

it is sometimes possible to do this via joined queries but this may be
problematic.
 
Walt,

Assuming there is a relationship between the Membership and Board
tables, you will be able to make a Query based on both tables, and then
use this query as the Record Source of the form. But, what is the
nature of the relationship between Membership and Board? If it is a
one-to-one relationship, then you would probably save yourself a lot of
grief by combining them into one table. If it is a one-to-many
relationship, then... why don't you want to use a subform? That is by
miles the best way to enter/edit one-to-many data.
 
Back
Top