Fastone
Registered User.
- Local time
- Today, 16:39
- Joined
- Nov 21, 2002
- Messages
- 56
I have a problem with a function. I have entered it into the VBA windows and have done a debugging so the function should be fine. If I now want to use it in a query I get the "undefined function" error.
In the query I type:
Commission: CalCom([Products Complete].[Price Excl VAT])
And the function is:
Function CalCom(priceEV As Double)
Dim inCom As Double
inCom = InputBox("Enter Commission > percentage in decimals (20% = 0,20)", Commission)
CalCom = inCom * priceEV
'Debug.print "Commission: " & inCom & " Price: " & priceEV & " Calculated: " & CalCom
End Function
The strange thing is that even if I use the expression builder, it gives me this error. Any ideas?
In the query I type:
Commission: CalCom([Products Complete].[Price Excl VAT])
And the function is:
Function CalCom(priceEV As Double)
Dim inCom As Double
inCom = InputBox("Enter Commission > percentage in decimals (20% = 0,20)", Commission)
CalCom = inCom * priceEV
'Debug.print "Commission: " & inCom & " Price: " & priceEV & " Calculated: " & CalCom
End Function
The strange thing is that even if I use the expression builder, it gives me this error. Any ideas?