Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / July 2007

Tip: Looking for answers? Try searching our database.

Subform and using variables

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bobbye R - 31 Jul 2007 01:10 GMT
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
Damian S - 31 Jul 2007 03:14 GMT
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.

> 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
[quoted text clipped - 6 lines]
>
> --Access 2003 User,  Thanks in advance  Bobbye
Bobbye R - 31 Jul 2007 17:28 GMT
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?
Signature

Access 2003 User,  Thanks in advance  Bobbye

> Hi Bobbye R
>
[quoted text clipped - 21 lines]
> >
> > --Access 2003 User,  Thanks in advance  Bobbye
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.