UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Requerying one subform from another subform    
 
   
sjohanson
post Jan 15 2005, 02:50 PM
Post #1

New Member
Posts: 13
From: San Francisco, CA



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
Go to the top of the page
 
+
spender
post Jan 15 2005, 03:06 PM
Post #2

UtterAccess Addict
Posts: 210
From: Birmingham UK



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
Go to the top of the page
 
+
MadHatter
post Jan 15 2005, 03:55 PM
Post #3

UtterAccess Addict
Posts: 230
From: Sweden



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
Go to the top of the page
 
+
sjohanson
post Jan 19 2005, 12:20 PM
Post #4

New Member
Posts: 13
From: San Francisco, CA



worked great. Thanks.

Steve
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 18th May 2013 - 10:48 AM