Results 1 to 8 of 8
  1. #1
    Suzie2012 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    17

    Calculated field, data from multiple tables


    im creating a report

    I have several tables i need to pull the info from. Services Table, Products Table, Concessions, and Account Payments. I have created a Data macro for each table to calculate the totals. how do i add those totals together to get a Grand total?

    I am using macros, not VB

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,847
    I don't work with macros.

    As long as all data fields are in the record source of the report, you can do calculations etc within the Report.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,598
    I agree with orange.

    I use only VBA. Code probably not required. Exact method all depends on how the reports are set up. If you want to provide db for analysis, follow instructions at bottom of my post.
    Last edited by June7; 06-12-2012 at 11:52 AM.
    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.

  4. #4
    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
    Ditto x 2! You will find that very few experienced Access developers use Macros, with the sole exception of the specialized AutoExec Macro that can be used to perform certain operations each time a Database opens. Macros are simply too inflexible for serious development and perform in a 'covert' manner, if you will!

    Using VBA, you can go into a Code Module for a Form and immediately see the vast majority of code that's being executed to keep the Form up and running.

    To get this same access to the events driving a Form, using Embedded [*]Macros, you have to
    1. Select a Control
    2. Go to its Properties Pane
    3. One-by-one, go through the Properties, for that Control, opening each Macro, when found, to see what it's doing
    4. Repeat Steps 1-3, above, for each Control on the Form

    A rather daunting task on anything but the very simplest of Forms!

    If you're serious about Access development, you really have to get your toes wet in the VBA pool! But a the 'Developer from the House of Orange' suggested, in a Report you should be able to do this with VBA code or Macros, using the native Report Functions!

    Linq ;0)>

  5. #5
    Suzie2012 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    17
    im in the process of learning access, building this DB as i go. i will eventually learn VB, but in the mean time the people im making this for really want the DB functioning. and to get it functioning i have to get this one report to work. I have to get totals box for all daily sales, which the totals are coming from different tabels and i cant figure out how to get them to where i canadd them all together.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,598
    Again, want to provide db for analysis?
    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.

  7. #7
    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
    Quote Originally Posted by Suzie2012 View Post
    ...i have to get this one report to work. I have to get totals box for all daily sales, which the totals are coming from different tabels and i cant figure out how to get them to where i canadd them all together.
    To have Data from Multiple Tables appear together, as in a Report, you would use a Query. The main drawback to using Queries based on Multiple Tables is that they are frequently Read-Only, but this, of course, doesn't matter in Reports! Simply base the Report on a Query!

    Linq ;0)>

  8. #8
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,847
    Yes as Linq says, create the proper record source for your report.

    A query with the necessary fields from all tables involved along with the appropriate JOINS.
    If you have all the data fields available to you, you should have all required info for calculations, totals etc.

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

Similar Threads

  1. Replies: 5
    Last Post: 08-12-2013, 12:53 AM
  2. Replies: 6
    Last Post: 06-08-2011, 05:00 PM
  3. Code for data import with calculated field
    By Tyork in forum Programming
    Replies: 2
    Last Post: 01-21-2011, 03:15 PM
  4. Replies: 2
    Last Post: 12-03-2010, 09:33 AM
  5. Multiple tables same field
    By gilmania in forum Access
    Replies: 7
    Last Post: 10-15-2010, 04:07 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