Subform and using variables

G

Guest

I have a main form that when I enter a Company, the subforms combo box
populates with all the contacts for the selected company. I also have a
button on the subform that allows the user to add a new contact. When the
add form opens I need the new form to automatically enter three items. The
contact id is an auto number so there's no problem there but I non't know how
to automatically enter the Company code from the main form or contact type
which I store in a variable intcontacttype = 1. Please be a simplictic as
possible.

--Access 2003 User, Thanks in advance Bobbye
 
G

Guest

Hi Bobbye R

To pick up the company ID from teh main form, use a default value of

=forms!FORMNAME.COMPANYID_FIELDNAME

in the company ID field of the pop up form. Of course, replace FORMNAME and
COMPANYID_FIELDNAME with the appropriate real names from your database.

Do similar for Contact type.

Hope this helps.

Damian.
 
G

Guest

Thanks Damian. Worked great. I posted another question on 7/29 entitled
"Combo Box and not on list feature". Can you take a look at it and see if
you can help me with that one?
 

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