You didn't set the value into the Function but you need to. Do that, and put
it in the Control Source of the Control. (I assume you don't want to store a
value that you can calculate when you need it.). I think if I was deducting
VAT, I'd call the function something other than "specify_VAT", too? And I'd
pass the price as an argument so I could reuse the Function if I needed it
elsewhere, too. Phil may have a good point, too, about the VAT changing --
unless there are different VAT rates used for different locales, a Public
(global) Constant would be an option to keeping it in a table.
Thus, I might have a Control Source of
= PriceWithoutVAT([Price])
Larry Linson
Microsoft Access MVP
"Sven Seljom" <sv**@seljom.no> wrote in message
news:5v******************@news4.e.nsc.no...
Hi all!
I want to take the value from one form-field, deduct the VAT and return
the value in another form-field. I have made a Public Function for this and
attached it to the text-box. Can anybody help me with the correct syntax?
Here's what I got so far:
Public Function specify_VAT()
Dim vat
vat = "[price]/1.24"
End Function
I suppose what I want to know is how to put the result of this into the
form-field in question. Any thought appreciated.
Sven