Screen Refreshing

  • Thread starter Thread starter GeorgeMar
  • Start date Start date
G

GeorgeMar

What is the most effective way to refresh a sreeen after a
new record has been added without closing and opening
again or adding a refresh button?

I have a form that lists all staff. On the form is a
button, for New Staff, that opens up another form to enter
the new staff, which issues a new Staff ID. When the
staff has been added and the user drops back to the list,
the new staff is not seen until the screen is refreshed
somehow.

I can't find any event that would refresh on the form
getting focus again.

many thanks
george
 
You can requery the form. Try adding to the AfterUpdate event of the pop-up
form

Forms!NameOf1stForm.Requery

If it's just a listbox or other control that needs requerying, that can be
done also.

Forms!NameOf1stForm.NameOfControl.Requery
 
I use this function:

Function refresh()
On Error GoTo Err_refresh


DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70

Exit_refresh:
Exit Function

Err_refresh:
MsgBox "Dave, what are you doing?"
MsgBox err.Description
Resume Exit_refresh

End Function
 
Thank you very much Wayne!

George
-----Original Message-----
You can requery the form. Try adding to the AfterUpdate event of the pop-up
form

Forms!NameOf1stForm.Requery

If it's just a listbox or other control that needs requerying, that can be
done also.

Forms!NameOf1stForm.NameOfControl.Requery

--
Wayne Morgan
Microsoft Access MVP





.
 
Back
Top