Refresh Combo

  • Thread starter Thread starter Pete
  • Start date Start date
P

Pete

I have a Command Button on my TabCtrl Sub form that opens
a form so I can add another item, how do I open the form
in "Add" mode.

stDocName = "frmVenue"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Once I have added this item, I wish to be able
to "Refresh" the Combo/Sub Form that the new Item will
appear in, at the moment I have to close down the main
form, and reopen it which negates the use of the Command
button

thanks

Pete
 
Use the AfterUpdate event procedure for the form where you added the new
record to Requery the combo on the original form.

Something like this:

Private Sub Form_AfterUpdate()
Forms![Form1]![Combo1].Requery
End Sub
 
Thanks Allen
-----Original Message-----
Use the AfterUpdate event procedure for the form where you added the new
record to Requery the combo on the original form.

Something like this:

Private Sub Form_AfterUpdate()
Forms![Form1]![Combo1].Requery
End Sub

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

I have a Command Button on my TabCtrl Sub form that opens
a form so I can add another item, how do I open the form
in "Add" mode.

stDocName = "frmVenue"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Once I have added this item, I wish to be able
to "Refresh" the Combo/Sub Form that the new Item will
appear in, at the moment I have to close down the main
form, and reopen it which negates the use of the Command
button

thanks

Pete


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top