473,473 Members | 1,534 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Value displayed incorrectly in Recordset

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
2 1460
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

39
by: | last post by:
I am trying to run the following agregate function in a parameterized query on Access2000: Min(.*sqr(./.)/) The query saved OK, but an attempt to run it results in the message: The expression...
15
by: Sue Barth | last post by:
Hi all, I hope I'm in the right ng for this... I made an .asp page that allows users to toggle thru a directory of photos. The page accomplishes the following: selects a directory of photos...
0
by: Dave S | last post by:
In .Net 1.1 SP1 Web services that raise exceptions that contain xml encodable characters such as ",< etc. are displayed incorrectly. For example the exception "The file "filename.txt" cannot be...
5
by: bryan.com | last post by:
There must be a way. I'm making a selection from a drop-down list that had an ID number as the value and displays a text field. After submitting the data to the database I am sending an email and...
0
by: bigmaddaz | last post by:
Right I have a table on a page containing a recordset showing various records, when they click add button it add the information from that table into another one successfully. But now on that table...
15
by: Dave | last post by:
I am getting the error above intermittantly with an ASP 3.0 page using an MS Access 2003 database. I have searched Google extensively and found the following possible causes for this error: A...
21
by: giandeo | last post by:
Hello Experts. Is it possible to retrieve the value from a populated pull down menu from a database and then use that value to access the same database to get the related fields. Example: ...
20
by: teddysnips | last post by:
Weird. I have taken over responsibility for a legacy application, Access 2k3, split FE/BE. The client has reported a problem and I'm investigating. I didn't write the application. The...
1
by: zoeb | last post by:
Currently I have a table, and would like the calculate a field in the table by referencing values from another 3 tables. i.e. tblData Index1, Index2, Index3, Value 1 2 3 2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.