Solved Help with calculated field on form! (1 Viewer)

slharman1

Member
Local time
Today, 09:58
Joined
Mar 8, 2021
Messages
476
I have a subform that holds order details (line items), it has a subform that holds Accessory items for each quote detail item. some may have data and some may not (null) I am trying to use the following code to populate an unbound text box with the total price of the accessories linked by a QuoteDetailID.
Both forms are continuous forms.

Here is my code in expression builder, I am getting the dreaded #Name?:

=DSum([ExPrice],[qryQuoteAcc],[QuotetailID]=[CurrentRecord].[quoteDetailID])

Can someone point me in the right direction.
Thanks
 
Last edited:

Gasman

Enthusiastic Amateur
Local time
Today, 15:58
Joined
Sep 21, 2011
Messages
14,288
Try
Code:
=DSum("[ExPrice]","[qryQuoteAcc]","[QuotetailID]= " & [quoteDetailID])
if quoteDetailID is the name of your control that holds the quoteDetailID
 

slharman1

Member
Local time
Today, 09:58
Joined
Mar 8, 2021
Messages
476
Try
Code:
=DSum("[ExPrice]","[qryQuoteAcc]","[QuotetailID]= " & [quoteDetailID])
if quoteDetailID is the name of your control that holds the quoteDetailID
I have edited my post, can you take another look please, I tried the code you wrote still not getting through.
Thanks
 

slharman1

Member
Local time
Today, 09:58
Joined
Mar 8, 2021
Messages
476
Try
Code:
=DSum("[ExPrice]","[qryQuoteAcc]","[QuotetailID]= " & [quoteDetailID])
if quoteDetailID is the name of your control that holds the quoteDetailID
Great It Works! Thank you - I had a mispelled field
 

Users who are viewing this thread

Top Bottom