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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to make customer information appear in the subform when I click a
command button. How might I do this?

Thanks Dustin
 
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
--
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."
 
Dustin said:
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
 
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
 
Back
Top