Screen Refreshing

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
 
W

Wayne Morgan

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
 
U

UCLA NEWS

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
 
G

GeorgeMar

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





.
 

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

Top