Results 1 to 6 of 6
  1. #1
    wjm821 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2021
    Posts
    7

    Main Form Data input, subform query to calculate

    Main form record source is tbl1 it has ParID,3 check boxes, 3 text boxes (enter a number). Subform record source qry1 (tbl1 & tbl2($$), ParID , $ for checkboxs, $ for text boxes, $total and both are linked with ParID. What I'm trying to do is if ckbox1 is checked, the query ckbox1 true then $$ (after Update) text 1 entered 5, query take 5*text 1 $(assume value$2) = $10. Query works if you're pulling from tbl1. The subform either shows total of the first record or it's completely blank.



    Enter data in main form and have $$ show in subform with $$Total. Hope you can follow this and thank you for the help!
    Attached Files Attached Files
    Last edited by wjm821; 07-27-2025 at 01:23 AM.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 11 Access 2021
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Really should not need tbl1 in subform.
    Last edited by June7; 07-27-2025 at 10:13 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.

  3. #3
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,550
    Data entry is only allowing to add data.
    You need correct data to link anything.

    Look at PartyID 5.
    Attached Files Attached Files
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  4. #4
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,818
    It might help if you could explain the purpose of the database?

  5. #5
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,818
    The Op contacted me via PM and I have given him a quick solution to his problem as shown in the attached.
    Attached Files Attached Files

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 11 Access 2021
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    I don't even understand why this is two tables and not just one. Yes/No fields seem redundant.

    A yes/no field is never Null - it is either 0 or -1. So the Nz() condition is not needed.
    Simplify:
    P1Sales: Abs([party1])*[party1fee]
    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.

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

Similar Threads

  1. Replies: 9
    Last Post: 03-05-2021, 09:44 AM
  2. Replies: 10
    Last Post: 07-05-2017, 11:31 AM
  3. Replies: 4
    Last Post: 02-04-2012, 12:51 PM
  4. Replies: 2
    Last Post: 06-17-2010, 04:15 PM
  5. Replies: 1
    Last Post: 06-14-2010, 02: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