Results 1 to 4 of 4
  1. #1
    TinaCa is offline Advanced Beginner
    Windows Vista Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    87

    Calculate field after combo update

    I tried to do this with one query but the data was incorrect - probably because of the joins. I need two Sums from two different tables. Then I need to add those two sums together. So on the form, after a user selects 1 or 15 (billing date of the month for companies) I have the system do a refresh which updates the (listbox) fields txtExtras and txtMonthly. The first is a sum of the extras for a company that have not been billed and the second is sum of all companies that get billed on the date chosen my the user (1 or 15).

    Now, I want to add txtExtras and txtMonthly in another field on the form. I have tried using a list box with the recordsource set to add the two fields - no go, I have tried a text box with the caluclation as the controlsource - also no go. I have tried adding them in code after the refresh still no go. Any ideas?

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    I believe that your issue is that a form may have only one record source. You will need to do the sums in a query (joining the two tables), then in a subform on your main form, make the new query the record source. You will need to create a parent/child relationship between the form and subform so there needs to be some common field.

  3. #3
    TinaCa is offline Advanced Beginner
    Windows Vista Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    87
    That's not accurate. Each list box is already pulling data from two different sources. The form itself does not have a recordsource - think of a form you would use to display and run a list of reports. You put in criteria and click on the appropriate button and the report you selected runs, i.e. the form has no recordsource.

  4. #4
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    I can't visualize this. Perhaps, you should post a copy of your db so that others more experienced than me can assist as I am sure that may be an issue.

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

Similar Threads

  1. Replies: 3
    Last Post: 06-04-2012, 12:28 AM
  2. Calculate a field in a form
    By alscompany in forum Forms
    Replies: 4
    Last Post: 02-28-2012, 03:09 PM
  3. Replies: 5
    Last Post: 12-17-2010, 11:06 AM
  4. how to calculate Percent in an update query?
    By newtoAccess in forum Queries
    Replies: 4
    Last Post: 11-23-2010, 10:11 AM
  5. Calculate one field based on another one
    By Douglasrac in forum Forms
    Replies: 7
    Last Post: 11-18-2010, 01:30 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