Full Version: Requerying one subform from another subform
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
sjohanson
I have two subforms that are datatables. I want to select a record on the lefthand form and have the form updated. The righhand form is in a tab control. This does not work:
----
Private Sub Form_Current()

DoCmd.Requery "Tabctl118"

End Sub
---
Help anyone?

Steve
spender
Steve

Try
CODE

Forms!MainFormName!SubformName.Requery


The subform name is NOT the name of the tabcontrol - select the subform then look under properties.

HTHs
MadHatter
And another thing...
Place this code (and modify it with the correct names on your forms) in the subform you will do the changes.

Private Sub Form_AfterUpdate()
Forms![MyPrimaryForm]![MyOtherSubForm].Requery
End Sub
sjohanson
worked great. Thanks.

Steve
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.