Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

access a subform. 1

Status
Not open for further replies.

AT76

Technical User
Apr 14, 2005
460
US
Hi,

Is there a way to access a subform thru code? I want to make this subform update after making a selection in the main form.

Thanks!
 
Also, is it possible to access a subform from another subform?
 
Let me explain better, A form has two subforms. I would like to access subform2 from subform1.

Thanks!
 
Among other threads, see FAQ from Microsoft: Access Forms forum: How do I set a control in a subform from the main form (and vice versa)?
faq702-2206


Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
traingamer, Extremely cool!!! Thanks! I understand now how to get values from a subForm to a MainForm.

One more question, If I want to update the values of a subForm base on a value selected from another subForm how would I do this?

Both subforms are underneath a mainform.

Thanks again!!!

 
In other words here's what I want to do:

I'm able to open a new form an make it change go to a specific record based on values I pass:

Code:
    Dim stDocName As String
    Dim stLinkCriteria As String
    Dim className As String

    stDocName = "formName"

    className = Me.Course_Name.Value

    stLinkCriteria = "[Course_Name]='" & className & "'"

    DoCmd.OpenForm stDocName, , , stLinkCriteria

I would like to do the same but instead of opening a new form, I would like to refresh a subForm.

I'm accessing this subform from another subform. Can you advice how to go about doing something like this?

Thanks!!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top