Results 1 to 8 of 8
  1. #1
    tpcervelo is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    28

    Refresh Form


    I have 3 tabbed forms (Home, CustomerOrders and GreenSheet). Home has command buttons to open the other forms, run an update macro or quit the App. A button on CustomerOrders will add a record to GreenSheet. I have a docmd.runsql which inserts the reocrd. I want the record to be visible if the user switches to the GreenSheet form. It only appears if I close and reopen the form manually. I tried a [Forms]![GreenSheet].Requery after the insert but that didn't work.
    Any help is much appreciated.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    What is the source of the values displayed on the GreenSheet tab?

  3. #3
    tpcervelo is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    28

    Refresh Form

    The source of form Green Sheet is table GreenSheet which I insert the record from form Customer Orders (table Customer Orders).

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    So your tabbed MainForm has a SubForm on the GreenSheet tab, correct?

  5. #5
    tpcervelo is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    28

    Refresh Form

    RuralGuy,
    I did not set any forms up as sub forms. There are 3 separate forms...Home, Customer Orders and Green Sheet. I open Home on startup and the user opens either of the other 2 from command buttons on Home. Customer Orders hooked to table Customers to insert records into table Greensheet (hooked to Form Green Sheet) and Green Sheet form to delete records from table Greensheet. The records are being inserted because I can manually close and reopen form Green Sheet and they appear. I tried to attach a requery on form Green Sheet's OnFocus but that didn't work either.
    Hope this makes the description of my app and problem cmore clear.
    thanks...

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You can test to see if the other form is open using the Forms collection and Requery the form if it is. Does that help?

  7. #7
    tpcervelo is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    28

    Refresh Form

    Solved it...I had the wrong form name on my Requery after the RunSql insert. Appears to be working now.
    Thank you very much for your help...I will mark as solved.

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Excellent! Thanks for posting back with your success.

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

Similar Threads

  1. How to refresh and close a form
    By LAazsx in forum Forms
    Replies: 10
    Last Post: 12-13-2010, 06:24 AM
  2. Refresh Query using Value on Form?
    By AKQTS in forum Programming
    Replies: 3
    Last Post: 10-25-2010, 09:33 AM
  3. update/refresh form
    By SlowPoke in forum Access
    Replies: 3
    Last Post: 09-20-2010, 09:21 AM
  4. refresh a form
    By RedGoneWILD in forum Forms
    Replies: 18
    Last Post: 09-03-2010, 08:31 AM
  5. Refresh form search text box
    By oxicottin in forum Forms
    Replies: 2
    Last Post: 11-19-2007, 02:28 PM

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