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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

refreshing form from sub form

Status
Not open for further replies.

IANGRAND

Technical User
Jul 29, 2003
92
GB

How can I make the form refresh and display the data just entered through the subform

Ive already tried me.refresh but to no avail
 
What are you asking?

Refreshing a main form from a subform?
[tt]me.parent.form.refresh[/tt]

Refreshing a subform from a main form?
[tt]me!subformcontrolname.form.refresh[/tt]

or recalculate? Use [tt]Recalc[/tt]
or requery? use [tt]Requery[/tt]

Hint - type the different keywords into VBE, and while the cursor is within one of them, hit F1 to see a little on what they do (and not;-))

Roy-Vidar
 
Some code like this?
Code:
Dim strTemp1 As String
Dim strTemp2 As String
Dim strTemp3 As String

strTemp1 = Forms!frmMySubForm!txtText1
strTemp2 = Forms!frmMySubForm!cmbCombo2
strTemp3 = Forms!frmMySubForm!cmbTest3

DoCmd.Close(acForm, "frmYourMainFormName")
Docmd.OpenForm("frmYourMainFormName")

txtMainFormText1 = strTemp1
txtMainFormText2 = strTemp2
txtMainFormText3 = strTemp3
txtMainFormText1.SetFocus
Of course, your control/form names would be different, and some of the format/context may be different.

Stephen [infinity]
"Jesus saith unto him, I am the way, the truth, and the life:
no man cometh unto the Father, but by me." John 14:6 KJV
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top