refresh or requery

torquay

Registered User.
Local time
Today, 16:20
Joined
Dec 27, 2005
Messages
85
Hope someone can point me in the right direction.
I am trying to refresh a form from another form, here's the scenario.
frmCurrentStock has all of the current stock and from time to time I need to add new stock items. I have a button that opens up a frmAddStockItem for me to add a new stock item. Of course when frmAddStockItem is closed the new stock item isn't showing up on frmCurrentStock until it is refreshed. Is there a way I can have frmCurrentStock refreshed when the close button is clicked on frmAddStockItem. Any help would be appreciated.
 
onclick
docmd.runcommand accmdsaverecord
forms!frmcurrentstock.requery
etc.
 
"have a button that opens up a frmAddStockItem"

  • Make sure that frmAddStockItem is Popup/Modal
  • In the code behind your button, after the line to open frmAddStockItem, add the line Me.Requery
Making frmAddStockItem Popup/Modal halts the code until it's been closed, at which time the calling form will be requeried
 
Also, check out the VBA help file as it has some really good information on the differences between REFRESH and REQUERY.
 
Thank you very much have it working perfectly now. I was nearly there but just needed a little guidance.
 

Users who are viewing this thread

Back
Top Bottom