Results 1 to 5 of 5
  1. #1
    ariansman is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Posts
    57

    form / query relationship


    There is a query named query1, which has a column named “salary”.
    We also have a form with a textbox named “payments”.
    Can we design the form so that when it is loaded the textbox named payments gets the sum of column salary of query1?
    I mean: “payments” in form textbox = sum of “salary” column from query1

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    Query1 is not the form's RecordSource?

    Could use a domain aggregate function (DLookup, DSum, DMax, etc.) expression in textbox.
    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
    ariansman is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Posts
    57
    Quote Originally Posted by June7 View Post
    Query1 is not the form's RecordSource?

    Could use a domain aggregate function (DLookup, DSum, DMax, etc.) expression in textbox.
    the form is not made on query1.

    can you help more about the expressions? i mean how can i write them and make them use query1?
    thank you

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    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.

  5. #5
    mitch_pearce79 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Dec 2012
    Location
    Perth
    Posts
    15
    Dsum(“Payments”, “query1”, criteria)
    Criteria might be:
    “PersonID = “ & me!PersonID & “” if the payment sum is related to a person (PersonID) on frmPerson
    What is your main form based on?

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

Similar Threads

  1. HELP! Form data, relationship, query
    By cgkelleher in forum Forms
    Replies: 1
    Last Post: 02-22-2013, 03:53 PM
  2. Replies: 2
    Last Post: 11-19-2012, 10:54 AM
  3. Replies: 5
    Last Post: 04-18-2012, 07:12 AM
  4. Query relationship structure
    By Juicejam in forum Queries
    Replies: 15
    Last Post: 02-12-2012, 10:26 PM
  5. Query with many-to-many relationship
    By jhollingsh615 in forum Queries
    Replies: 4
    Last Post: 05-18-2011, 11:31 AM

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