Dan Waters
dwaters at usinternet.com
Sun Jan 6 11:09:31 CST 2008
Hi Arthur,
You've set up your function as Long, which is an integer, and will round
down to 0.
You need a Weekend! ;-)
Or maybe a pint! Yeah - a pint will do it!
Dan
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller
Sent: Sunday, January 06, 2008 10:51 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] Puzzling Behavior
Maybe I'm just having a senior moment, but I can't figure out why I'm
getting the results I am. This is a really simple task. I have a system
parameters table containing two tax rate fields, GST and PST, whose values
are .05 and .08 respectively. I wrote a pair of wrapper functions to return
these values:
Function GSTRate() As Long
GSTRate = DLookup("GST", "Company")
End Function
The function should return 0.05 but instead it returns zero. In the
immediate window, if I type this:
? Dlookup("GST", "Company")
I get back 0.05
Why doesn't the function return the same value? I even tried multiplying it
by 100, but it still gives me zero. What am I doing wrong?
TIA,
Arthur
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com