Results 1 to 3 of 3
  1. #1
    JeffChr is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Feb 2014
    Posts
    82

    Form Refresh Issue

    This is a bit unusual I think. I have two related forms. The second form is opened in dialog mode with a button from the first.



    Code execution stops in the first form after the open statement for the second form until the second form is closed.

    The second form modifies the same record that is current on form 1.

    After form 2 closes, form 1 executes a refresh, so it is populated with form 2 updates.

    When I try to do calculations on these new updated field values in form 1 they fail unless I pause the VBA code with a msgbox prior to performing calcs after the refresh.

    Wild ! Anyone ? Thanks in advance for your assistance.

  2. #2
    qa12dx is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Location
    india
    Posts
    112
    form 2;
    set tempvar to id rec on form1
    close form2
    applyfilter form1.id=tempvar
    requery
    do calcs
    remove tempvar

  3. #3
    JeffChr is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Feb 2014
    Posts
    82
    Quote Originally Posted by qa12dx View Post
    form 2;
    set tempvar to id rec on form1
    close form2
    applyfilter form1.id=tempvar
    requery
    do calcs
    remove tempvar
    Ahh, yes you are correct. I couldn't figure this one out so I turned on "break on all errors" and then started receiving EC 7878. I don't know why I wasn't receiving this message prior to the options change since I was not trapping errors anywhere in my code. whatever.

    you are correct. I should have realized what was going on.

    i ended up just changing form 1 from form 2 and using just the one dataset which solved my problem. THANKS !

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

Similar Threads

  1. Replies: 22
    Last Post: 05-21-2013, 07:54 PM
  2. Replies: 1
    Last Post: 01-24-2012, 03:47 PM
  3. Access 2010 Refresh VS Refresh ALL
    By Snwboarder1982 in forum Access
    Replies: 1
    Last Post: 09-09-2011, 04:07 PM
  4. Refresh Form
    By tpcervelo in forum Forms
    Replies: 7
    Last Post: 02-07-2011, 08:03 AM
  5. refresh a form
    By RedGoneWILD in forum Forms
    Replies: 18
    Last Post: 09-03-2010, 08:31 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