Using Forms in Access to enter linked data

O

oughost

I have three linked tables that I want to enter data to using a single form.
These tables are:
tblMember – which stores the details for a member. Its fields are id,
firstname, surname & occupation
tblMemberAddress – which holds the addresses of members; home address, work
address etc . Its fields are memberID, housename, postcode, city &
addresstype and
tblMemberGroup – which holds the id of the group the member is assigned to.
I have managed to use the wizard to create a form to enter details into all
of these tables. However, when I view the form in ‘view’ mode it shows a
blank form. I suspect that the form is not bound to any of the tables. How do
I get the fields to be displayed so I can enter data?
 
C

Carl Rapson

oughost said:
I have three linked tables that I want to enter data to using a single
form.
These tables are:
tblMember - which stores the details for a member. Its fields are id,
firstname, surname & occupation
tblMemberAddress - which holds the addresses of members; home address,
work
address etc . Its fields are memberID, housename, postcode, city &
addresstype and
tblMemberGroup - which holds the id of the group the member is assigned
to.
I have managed to use the wizard to create a form to enter details into
all
of these tables. However, when I view the form in 'view' mode it shows a
blank form. I suspect that the form is not bound to any of the tables. How
do
I get the fields to be displayed so I can enter data?

What you're seeing usually occurs when the underlying table or query
contains no records and the table/query isn't updatable. I'm assuming the
form is based on a query; you can find it in the form's Record Source
property. Try making a copy of the Record Source code and pasting it into a
blank SQL window (create a new query in Query Design mode, close the table
selection window, then switch the view to SQL). See if you can run the code
in the SQL window, and once it runs see if you can update records or add new
records. If you can't add/update records, your query is non-updatable. You
may need to rethink your query design to make it updatable.

Suggestions: I'm guessing that if your query is based on all three tables
it's probably non-updatable. If members can only belong to a single group,
there's no reason to store the member group in a separate table so you could
eliminate one table right there. If members can have multiple addresses, it
would be better to set up your form in a parent-subform arrangement, where
the parent form is based on tblMember and the subform is based on
tblMemberAddress. That way, the main form is based on a single table and you
won't usually see non-updatable records; records added to the subform will
automatically pick up the member id.

Carl Rapson
 
J

John W. Vinson

How do I get the fields to be displayed so I can enter data?

Use a Form bound to the members table, and Subforms bound to the other two
tables.

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