Results 1 to 4 of 4
  1. #1
    Monterey_Manzer is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2012
    Posts
    164

    Calculated fields going blank after update

    Hey All,



    So this should be a fairly simple problem. I've got a relatively code heavy form in which I track internship durations and payments. I currently have a Start Date and End Date from which the number of working days is calculated. Due to some irregularities in the way these internships can be scheduled I also have an Internship Correction box. The control source for my Number of Workdays is as follows: =(CalcWorkdays([First Day],[Last Day]))-[InternCorrect]. The CalcWorkdays is the function I use to count only weekdays and exclude weekends in my calculation.

    Now here's my problem. Updating either date field or correction field is supposed to re-query the calculated field. However, when I update a field the Number of Workdays field tends to go blank and only after clicking on several controls does it appear. The calculation is always correct but this disappearing value is rather disconcerting. There are a number of other fields that rely on this Number of Workdays for their calculation and they do not appear to update until the new value appears again. Does anyone have any idea why this may be occurring?

    Thanks.

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    See "Recalc Method" in HELP.

    Example:


    Code:
    Sub Freight_AfterUpdate()
       Me.Recalc 
    End Sub
    Last edited by ssanfu; 10-08-2012 at 01:14 PM. Reason: code formatting

  3. #3
    Monterey_Manzer is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2012
    Posts
    164
    Thanks Steve! That works beautifully.

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

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

Similar Threads

  1. Calculated fields
    By FinChase in forum Queries
    Replies: 5
    Last Post: 02-02-2012, 06:12 PM
  2. no blank fields
    By imintrouble in forum Forms
    Replies: 2
    Last Post: 10-24-2011, 10:21 AM
  3. Calculated Fields Help
    By Mossy in forum Queries
    Replies: 4
    Last Post: 10-10-2011, 01:13 AM
  4. calculated fields
    By nashr1928 in forum Forms
    Replies: 1
    Last Post: 07-21-2010, 04:49 PM
  5. Sum of calculated fields
    By nkuebelbeck in forum Forms
    Replies: 9
    Last Post: 03-12-2010, 01:32 PM

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