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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refresh Data in form 1

Status
Not open for further replies.

stupiet

Programmer
Aug 21, 2001
176
US
To anyone that can help,

I have created an employee database. I have two forms. When a user opens the database he/she will see the first form which lists all the employees in a listbox (EmployeeList). The user can add a new employee by clicking on a button which will open the second form. The second form is a pop-up form, so underneath you will still see the Employeelist form. After the user adds the new employee the second form will close and the focus is back on the employeelist form. However, The list does not get updated automatically. I've tried running codes with DoCmd.Requery and Me.Refresh etc. but can't get it to work. Is there a way to automatically update after an user adds a new employee?

Please let me know.

Thanks,

Stupiet
 
Forms!FirstFormNameHere!ListBoxNameHere.requery

Put this as the last line in the OnClose event of your pop-up form.

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244. Basics at
 
Thanks. Didn't know it was that easy. It works like a charm!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top