refresh/reload/requery a form

D

Dave

I have a form that is a list of clients (frmClientList)(not editable).
I have it set so if you double click on any last name it opens a client
profile form (frmClientProfile) for that client when they make changes to
client info I want to close the form (frmClientProfile) and have the updated
info show on the list of clients (frmClientList).
I am thinking I can put a line of code on the click event of the button that
closes (frmClientProfile) but I do not know how to write it.
also I have noticed that when I do close (frmClientProfile) and try to
manually refresh (F9) the form (frmClientList) that is DOES NOT update - I
have to close (frmClientList) and reopen to see the changes.

Any help here will be appreciated.

Thanks in advance
D
 
T

tina

on the Close button on frmClientProfile, try adding the following code to
the Click event procedure, as

If Me.Dirty Then Me.Dirty = False
DoCmd.Close , , acSaveNo
DoCmd.SelectObject acForm, "frmClientList", False
Forms!frmClientList.Requery

hth
 
D

Dave

That did what I wanted.
Thanks much
D
tina said:
on the Close button on frmClientProfile, try adding the following code to
the Click event procedure, as

If Me.Dirty Then Me.Dirty = False
DoCmd.Close , , acSaveNo
DoCmd.SelectObject acForm, "frmClientList", False
Forms!frmClientList.Requery

hth
 
Top