Results 1 to 6 of 6
  1. #1
    Battlescar is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2017
    Posts
    18

    Public Function fCalc_Items Table not updating form.


    Hi
    I was wondering if someone can help me with my problem. It seems when I update a table(tblSurveyListsub) for the form(frmEQ_EQCollectionbyMonthApprov) it does not update. But if I use the table (tblSurveylistSubold) rename to tblSurveyListSub the form calculates and works. I am going crazy to find out why and how to fix it. I have attached the database for whoever to look at. It runs from Module1 in the form (frmEQ_EQCollectionbyMonthApprov).

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    All you are doing is calling function in a textbox expression to calculate a value. Saving that calculated value to table requires more code - VBA or macro. Such as:

    Me.fieldname = Me.textboxname

    Real trick is figuring out what event to do this in - perhaps the Close Form button click.

    Saving calculated data, especially aggregate data is usually a bad idea.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Need more information. This seems a very convoluted method for getting to the values to display. Each section could be a subform with the values already calculated, linked by year. I could not see where you are updating a table.

  4. #4
    Battlescar is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2017
    Posts
    18
    Quote Originally Posted by aytee111 View Post
    Need more information. This seems a very convoluted method for getting to the values to display. Each section could be a subform with the values already calculated, linked by year. I could not see where you are updating a table.
    Sorry I am not really updating a table. If I replace the data in the table or insert new data into the table it doesn't work. The form works fine if you use the old table.

  5. #5
    Battlescar is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2017
    Posts
    18
    I am not updating any table. Bad choice of words. If I replace the data in the table which I did in this example it does not work. But If I use the tblsurylistsubold the forms calculates and work.

  6. #6
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Looking at the surface, there doesn't seem to be any data to be displayed. I would highly recommend doing this a different way, to keep it simple.

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

Similar Threads

  1. public function values from form
    By ShostyFan in forum Programming
    Replies: 4
    Last Post: 10-02-2017, 02:11 PM
  2. Replies: 2
    Last Post: 09-12-2016, 11:00 AM
  3. Replies: 3
    Last Post: 06-24-2015, 06:25 PM
  4. Replies: 4
    Last Post: 11-13-2014, 08:00 PM
  5. Public variable not updating for each function
    By Ruegen in forum Programming
    Replies: 3
    Last Post: 08-28-2014, 06:26 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