Requery/Refresh Subform

King Kreglo

Registered User.
Local time
Today, 15:22
Joined
Aug 31, 2013
Messages
32
I have a main form with a few buttons to select which opens another window where the user orders products from. The main form remains open.
When the order is finished they click submit and the data is appended to a subform on the main table. I can't quite figure out how to get my subform to update.
Here is the code I tryed to use:
Code:
Private Sub Command7_Click()
DoCmd.SetWarnings 0
DoCmd.(runs several queries)
DoCmd.Close
DoCmd.OpenForm "frmBegin Order"
Me![Order Central - Access].[frmBegin Order].Requery
 
End Sub

Any help would be appreciated, thanks!
 
That isn't doing it for me, I can't figure out why.
 
In the main form, me.ChildSubformName.form.requery
 
In the main form, me.ChildSubformName.form.requery
I gave that a shot as well, it looked like this:
Code:
DoCmd.RunMacro "mcrQryUpdate Order Central Speeds"
DoCmd.OpenForm "frmBegin Order"
Me.[subfrmOrder Central - Access].Form.Requery
End Sub
But I still have to click Refresh after to update the subform.... :banghead:
 
Which form contains your subform?

The 'Me' operator assumes the subform is in the form whose module the Me is used.

If the subform is in another form then use
Forms!ParentForm.[FONT=&quot].[subfrmOrder Central - Access].Form.Requery

Incidentally, I think it is good practice not to use spaces in the names of not only fields but controls, forms and queries.
[/FONT]
 

Users who are viewing this thread

Back
Top Bottom