creating forms with multiple tables

S

skruff

I have Access 2002, I created two tables, one that has all our customer
information and the other will put in information pertaining to services
rendered on a customers' pc. My question is, I created a form combining
these two tables. I did it all as one form instead of using a sub form.
When I go to the form to start entering information it will allow me to add
the information for the customer but not the information for the computer.
The table with the customer information has all the information in it, the
table that will have the computer information gets added as the forms are
filled in. When I did this a couple months ago the same thing happened, I
have to start adding the information in the computer table then I can go into
the form to finish inputting everything. I shouldn't have to do that. Does
anyone have any idea how I can just do everything from the form and it will
keep my table up to date?
 
K

Klatuu

Subforms aren't that bad. They are pretty powerfuls once you get the hang of
it. The most common problem people have is referencing objects on the
subform from the main form and referencing objects on the main form from the
subform.

Here are the basics that will help.
First, you don't address the name of the form being used as a subform. It
is a property of the subform control. Access will make the control the same
name as the subform when you first create it, but IMHO, they should not be
the same name. It can be confusing.

You always refer to the subform control, just as you would any other control
on your form. Then, you use the Form property of the subform control. So,
assume you have a control on the subform named txtCrBal. In the main form's
code, you would address it as:

Me.subFormControlName.Form.txtCrBal

Now, in the subform control's code you would refer to a control on the main
form as

Me.Parent.ControlName.

Hope that gets you going in the right direction.
 

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