By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,223 Members | 1,633 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,223 IT Pros & Developers. It's quick & easy.

Value displayed incorrectly in Recordset

P: n/a
I have a table, with two fields in it.. They're both defined as double
currency, 4 decimal places.

When I have a form on top of the recordset, it displays the fields just
fine.

When I use VB to open a recordset, when you msgbox the rst!fieldname,
you get the value only it's multiplied by 100!

Someone please help with what I'm sure is a simple error I've made
somewhere.
Anyone seen something like this before?

-Brian

Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Double currency?

Is this problem field of type Number (size Double), or is it of type
Currency?

And what precisely do you have in the Format and Input Mask properties of
the field?

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"BrianDP" <dp**********@yahoo.com> wrote in message
news:11*********************@g14g2000cwa.googlegro ups.com...
I have a table, with two fields in it.. They're both defined as double
currency, 4 decimal places.

When I have a form on top of the recordset, it displays the fields just
fine.

When I use VB to open a recordset, when you msgbox the rst!fieldname,
you get the value only it's multiplied by 100!

Someone please help with what I'm sure is a simple error I've made
somewhere.
Anyone seen something like this before?

-Brian

Nov 13 '05 #2

P: n/a
Allen (and groupies),

Thank you so much for replying to my post. I was finally able to dig
to the bottom of this. The problem centered around scientific
notation. Before I knew what the problem was, there were some clues
that gave it away.

1) Example- The original value was .02348374123, and if I would re-key
in the value, well, heck, we don't really need that precision, so I'd
re-key it in as just ".02348", and then there would be no problem!

2) Only SOME values were a problem, I'd run my program, and watch the
trace, comparing what it THOUGHT it was pulling as the value from the
table, and what it really should have been. Many of them were just
fine!

SO IN THE END... I set the definition for MC (Material Cost) to

Field Data Type: Number

Field Size: Decimal
Format: General Number
Precisiooo: 18
Scale: 4
Decimal places: Auto.

Thank you so much Allen for replying, I really enjoy using your web
site, and having you around when I'm in a jam like this. You are a
great asset to the Access Community.

Three Cheers for Allen Browne!!

Sincerely,
-BrianDP

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.