Results 1 to 5 of 5
  1. #1
    cbuechner is offline Advanced Beginner
    Windows 10 Access 2007
    Join Date
    Jan 2021
    Posts
    60

    Text Box

    I have a query "tooling_cost", and it has a field Tool/Gauge_Cost or SUMofTool/Gauge_Cost. In a form "Tooling_Markup" I want to add a text box (in the header) value results of the query meets the criteria



    Tooling_Cost.Part=Forms!Tooling_Markup!Part

    Not sure why I keep getting error.

  2. #2
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,643
    is this a field Tool/Gauge_Cost or a calculation Tool divided by Gauge_Cost ?
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  3. #3
    cbuechner is offline Advanced Beginner
    Windows 10 Access 2007
    Join Date
    Jan 2021
    Posts
    60
    Quote Originally Posted by moke123 View Post
    is this a field Tool/Gauge_Cost or a calculation Tool divided by Gauge_Cost ?
    It is a SUM for a specific part. For example,

    Part 1 $50.00
    Part 2 $25.00
    Part 1 $25.00

    In the query

    Part 1 $75.00
    Part 2 $25.00

  4. #4
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,643
    My question had to do with the / which is an arithmatic operator. Is it part of the field name or an operator?
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  5. #5
    accesstos's Avatar
    accesstos is offline Expert
    Windows XP Access 2007
    Join Date
    Dec 2018
    Location
    Greece
    Posts
    551
    Quote Originally Posted by cbuechner View Post
    I have a query "tooling_cost", and it has a field Tool/Gauge_Cost or SUMofTool/Gauge_Cost. In a form "Tooling_Markup" I want to add a text box (in the header) value results of the query meets the criteria

    Tooling_Cost.Part=Forms!Tooling_Markup!Part

    Not sure why I keep getting error.
    Give a try to this expression:
    Code:
    =DLOOKUP("ToolCost","Tooling_Cost","Part=" & [Part])
    where "ToolCost" = the name of the field Tool/Gauge_Cost.

    If the Part is not numeric, have to use single quotes as seems below:
    Code:
    =DLOOKUP("ToolCost","Tooling_Cost","Part='" & [Part] & "'")

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

Similar Threads

  1. Replies: 5
    Last Post: 11-06-2020, 09:44 AM
  2. Replies: 15
    Last Post: 02-17-2019, 06:19 PM
  3. Replies: 1
    Last Post: 05-18-2016, 09:46 AM
  4. Replies: 3
    Last Post: 02-07-2013, 09:53 PM
  5. Replies: 1
    Last Post: 05-24-2012, 04:59 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