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.

How do I make data from a main form appear on a subform?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dustin - 17 Jul 2007 14:22 GMT
I want to make customer information appear in the subform when I click a
command button. How might I do this?

Thanks Dustin
Al Campagna - 17 Jul 2007 15:26 GMT
Dustin,
  Let's say you want to display the City control value from the main form
on the subform.
  Using your own control names... create an unbound text control with a
RecordSource of...

       = Forms!YourMainFormName!City
Signature

hth
   Al Campagna
   Access MVP 2007
   http://home.comcast.net/~cccsolutions/index.html

   "Find a job that you love, and you'll never work a day in your life."

>I want to make customer information appear in the subform when I click a
> command button. How might I do this?
>
> Thanks Dustin
Dustin - 17 Jul 2007 22:04 GMT
Ok, Thanks for that info. But now I am questioning my design of the form. I
am doing a call tracking form for customers. I have it set up to search for
the customer in a couple of ways 1) a combo box with all the phone numbers 2)
a combo box with Last Names. The Combo Boxes are recordset cloned on
AfterUpdate.

My problem is that the main form is based on my customer table and I don't
want to add a record to that form only filter it. So I can't put a subform on
it because of the Master and Child Links.

So how do I filter the customer form and add the cust info to another form
that is not connected? Any thoughts appreciated.

Thanks Dustin    

> Dustin,
>    Let's say you want to display the City control value from the main form
[quoted text clipped - 7 lines]
> >
> > Thanks Dustin
Carl Rapson - 17 Jul 2007 15:27 GMT
>I want to make customer information appear in the subform when I click a
> command button. How might I do this?
>
> Thanks Dustin

If the command button is in the subform, just copy the values from the
controls in the Parent form:

   Me.txtBox = Parent.txtBox

If the command button is in the main form, the syntax is a little more
complicated:

   Me.ctlSubform.Form.txtBox = Me.txtBox

Carl Rapson
 
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.