refresh/reload/requery a form

  • Thread starter Thread starter Dave
  • Start date Start date
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
 
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
 
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
 

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