Form, subform and combo box

G

Guest

Hello,

I tried to set a entry form which can update two sets information in two
different tables at the same time. So I built a combo box for the key field
in the main form which is the common field in both tables, then set the
parent set of field in the first subform and the child set of fields in the
second subform. The combo box works, whenever I choose one number in the
combo box, the correspondent fields in both subforms come up.
But I have a problem with the items not in the list, I set no to LIMIT TO
LIST, it is ok for me to add new records. When a number I type in the combo
box is not in the list, all the fields in the subforms are not empty as I
expected, but filled with all the information of the first number in the
list. So I would like to know how to get empty fields for ready adding a new
record in both subforms.

Any help would be highly appreciated

Michelle
 
K

kingston via AccessMonster.com

I'm not positive I understand what you're doing but it sounds like you
haven't structured the data correctly or you've misapplied subforms. What is
your mainform bound to? You said that the first subform contains the parent
information while the second subform contains the child information. Is
there a reason why you did not embed the child subform into the parent
subform or did I misunderstand your explanation?

Anyway, I think it will help if you followed these steps:
Make a form for the Child data.
Make a form for the Parent data and in design mode, drag and drop the form
for the Child data in the details section and specify the common field.
Make a combobox in the header of the form for the Parent. Use this to find
and filter Parent records (and find subsequent Child records).

You should be able to add new records as if you were working with independent
forms and Access will do the linking for you.
 

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