Results 1 to 9 of 9
  1. #1
    FormerJarHead is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    52

    Immediate Update of Unbound Field

    Hi All,


    I'm sure this is a fairly simple but I can't figure it out.

    I have a bound form with an unbound calculated field that works as it should when I leave the form and then come back to it.
    How do I get it to populate the field after the calculation is completed and before I close the form.

    Thank you for any suggestions...

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Have you tried Me.Refresh?? (See Help)

  3. #3
    FormerJarHead is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    52
    I have. I've also tried Me.Requery. I've done that to both the Form and to the control itself...neither did any good.

  4. #4
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664


    I should have read your post closer. Do you mean you have a calculated FIELD defined in a table??


    You shouldn't save calculated values in a table for several reasons....
    See this page by Allen Browne:
    http://allenbrowne.com/casu-14.html

    Note the 2nd to the last paragraph.....

  5. #5
    FormerJarHead is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    52
    No. What I have isa form with an underlying query. I havean unbound calculated field on the form called WaitTime that uses the OnCurrent event ofthe form, Me.WaitTime = DateDiff("d", ReferralDate,Rep). This calculates perfectly but not until Ileave the form.

    I've tried putting in the Me.Refresh and Me. Requery inthe forms After Update Event with no luck. It's not a huge issue but deputies will be inputting data into thisform. If they do not see the fieldpopulate before moving onto the next record, they will assume it is notworking.

  6. #6
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    The "OnCurrent" fires when the record changes.

    Have you tried "Me.Recalc" to force a reclaculation?

  7. #7
    FormerJarHead is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    52
    I have. I should have shared this info earlier on, this is in Access 2010, but things should be pretty close with all. Like I said earlier, it works great in the OnCurrent, I need to figure out a way that it will populate once I tab to the next field...

  8. #8
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    If you already have this Form running off of a Query, then do the calculation in the Query, with a Calculated Field! Go into the Query Grid for the underlying Query and place this in a new Field:

    WaitTime: DateDiff("d", [ReferralDate],[Rep])

    Now go into your Form and use the new WaitTime Field as the Control Source for the Textbox on the Form.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  9. #9
    FormerJarHead is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    52
    The form is running off of a query but, not the unbound field. Problem is solved. What I was trying to accomplish was to have this unbound field update before leaving the form so there would be no confusion as to whether or not the field populated. By inserting this VB in "On Exit" in the field before the unbound field, when the user tabbed to the next field, my unbound field would populate. Thanks again to all that gave me some ideas and made me think more than I care too...Stay Safe..

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

Similar Threads

  1. Display record in unbound text field on form
    By MAABDOLAT in forum Forms
    Replies: 1
    Last Post: 07-25-2012, 06:10 PM
  2. Replies: 5
    Last Post: 06-23-2012, 10:30 PM
  3. populate unbound field
    By DCV0204 in forum Access
    Replies: 3
    Last Post: 03-16-2012, 02:41 PM
  4. Unbound checkbox's that update
    By Madmax in forum Forms
    Replies: 5
    Last Post: 06-20-2011, 02:56 PM
  5. Replies: 6
    Last Post: 12-01-2010, 06:52 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