Solved Substract to values in same row and return value DLOOKUP

mhakim

Member
Local time
Today, 08:02
Joined
Jan 25, 2021
Messages
72
I have one row contains : Name | Debit | Credit
Customer| 5500 | 2000
_____________________________________________________________________________________________________________________________________________

i want to make formula Using Expression Builder by Access Reports

Dlookup

return Net (Amount Debit - Credit)

3500
 
something like this in a controlsource in the detail section

=dlookup("[debit]-[credit]","myTable","[Name]='" & me.Name & "'")

note Name is not a good name for a field or control, it is a reserved word. In this case, Me.Name could refer to a field or control or it could refer to the name of the report

Not sure why you want to do this, normal practice would be to include it in your report recordsource as a subquery not a domain function
 
you can also create a Query:

select [name], [debit], [credit], [debit]-[credit] as net from yourtableName;

create a report based on this query.
 

Users who are viewing this thread

Back
Top Bottom