D
Dudley
I am trying to amend a macro in an invoicing database written by someone
else. The macro marks an invoice as paid. Following through the code I come to
Function InvoicePriceIncVAT(INum As Long) As Currency
InvoicePriceIncVAT = InvoiceTotal("Price inc VAT", INum)
End Function
InvoiceTotal is another function, and "Price inc VAT" is a field in the
current table, but I cannot find what Inum means.
Then:
Function InvoiceTotal(Key As String, INum As Long) As Currency
Dim ITotal
ITotal = DLookup("[Total " & Key & "]", "Invoice Total Prices",
"[Invoice Number]=" & INum & "")
If IsNull(ITotal) Then
InvoiceTotal = 0
Else
InvoiceTotal = ITotal
End If
End Function
"Invoice Total Prices" is the name of a query, and I would expect the name
of the relevant field in it, "Total Price inc VAT" - instead I find Total " &
Key &". "Invoice Number" is a field in the query, but why does it = INum?
Can anyone help or suggest where I should look to get a solution?
Thanks
Dudley
else. The macro marks an invoice as paid. Following through the code I come to
Function InvoicePriceIncVAT(INum As Long) As Currency
InvoicePriceIncVAT = InvoiceTotal("Price inc VAT", INum)
End Function
InvoiceTotal is another function, and "Price inc VAT" is a field in the
current table, but I cannot find what Inum means.
Then:
Function InvoiceTotal(Key As String, INum As Long) As Currency
Dim ITotal
ITotal = DLookup("[Total " & Key & "]", "Invoice Total Prices",
"[Invoice Number]=" & INum & "")
If IsNull(ITotal) Then
InvoiceTotal = 0
Else
InvoiceTotal = ITotal
End If
End Function
"Invoice Total Prices" is the name of a query, and I would expect the name
of the relevant field in it, "Total Price inc VAT" - instead I find Total " &
Key &". "Invoice Number" is a field in the query, but why does it = INum?
Can anyone help or suggest where I should look to get a solution?
Thanks
Dudley