Results 1 to 3 of 3
  1. #1
    Moltin is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2016
    Posts
    4

    Question Updating open Form when new information is added to a table.

    Hello everyone.



    I'm lost on how to update a form without closing and re-opening it.

    Here is my situation: I have a navigation form that displays information about each of my employees individually by selecting a name from a scroll box. I have a button that opens up a new form allowing me to Add New Employees. The problem is once i have added my new employee and close that 2nd form i'm staring back at my first Employee form although when i select the scroll box i can not find that new employee to view. the only way around this is to close the form and re-open it. Is there a macro i can add to the scroll box or form to auto update without having to close and re-open?

    thank you for your help

  2. #2
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    If the combo is a bound field, in the close event for the adding form, try Forms!frmFirstForm.Requery.
    If it is not, you'll have to drill down to the actual control: Forms!frmFirstForm.cmbComboboxName.Requery
    Sub in your actual object names.
    You may want to ensure that the first form is still open, otherwise an error will occur when trying to requery a form that is not open.
    Code:
    If CurrentProject.Allforms("frmFirstForm").Isloaded Then
       Forms!frmFirstForm.Requery
    End If
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    Moltin is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2016
    Posts
    4
    Thank you micron, I'm still learning so I will give this a try tomorrow, I appreciate the help.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 03-17-2016, 12:42 PM
  2. Replies: 7
    Last Post: 07-01-2015, 10:29 AM
  3. Replies: 3
    Last Post: 01-09-2014, 07:45 PM
  4. Open form based on query information
    By MFS in forum Programming
    Replies: 3
    Last Post: 06-11-2011, 12:44 PM
  5. Button to open form with relative information...
    By darkyetlovely39 in forum Forms
    Replies: 28
    Last Post: 05-23-2011, 11:37 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums