Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refresh/Requery a Recordset from a different form

Status
Not open for further replies.

sogibear

Programmer
Jul 4, 2002
45
GB
Refresh/Requery an open Recordset from a different form

Hi,

Form A is 'unbound'and i'm using a recordset as its recordsource.
When you click on a certain button on Form A, a Popup form opens where some details are changed and saved. When the details are saved on the Popup form, id'd like to refresh the recordset in form A to show some changes, so far the only way i can do this is by editing the Popup form, saving and closing it as well as closing Form A then reopenning Form A again just to reflect the changes to the underlying recordset. This is very tacky and unnecessary i think. Any help would be greatly appreciated.
:)
 
In the On_Close event of the Pop-up form enter:

Forms!frmA.Requery

This will cause the recordset feeding frmA to fire and populate frmA with the changed data

Frank J Hill
FHS Services Ltd.
frank@fhsservices.co.uk
 
Thanks mate,

i'm still not done yet 'cus my form is unbound so even though it requeries just like you suggested, i need to call my DisplayCurrentRecord() function which is local to formA in order to display the requeried data.

So i need to call a function local to formA from within the Popupform, do you know how to do that ?

Thanks
:)
 
You need to make sure the DisplayCurrentRecord() function is declared as Public in your form then:

Forms!frmA.DisplayCurrentRecord

from whatever form you want.


hth


BEn

----------------------------------------------
Ben O'Hara

"Where are all the stupid people from...
...And how'd they get so dumb?"
NoFX-The Decline
----------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top