Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why is it rounded down?

Status
Not open for further replies.

alec

Programmer
Mar 7, 2001
21
0
0
US
I have a form created with Access'97 and VBA. It's been in production since 3 yrs ago.
Currently I need to do a little enhancement that is: In one of the textbox for credit course, the datatype that is used to be set for an integer in SQL is now need to be changed to float since user want to be able to enter 1.5 credit.

I've changed the datatype into float by went into the SQL Server ( enterprise manager ), saved it.
Then I re-linked the associated views and the tables from Access,changed the format to format=fixed and decimal=2, changed all the necessary variables to double.

When I tested the application, I enter 1.5 in that textbox and saved it, unfortunately it is saved into 1.00 instead of 1.50 and I got a message saying:
"The microsoft jet database engine stopped the process because you and another user are attempting to change the same data at the same time"

I know for sure there is no other user? and why the number is rounded up???????? Anyone can help me please? I've been trying to solve this problem for 2 weeks unsuccessful, Thanks! Alec
 
Alec:

I don't work on SQL Server but could the problem be a type mismatch: defined as float in the SQL table and fixed on the form?

Just a thought.
Larry De Laruelle
larry1de@yahoo.com

 
Hi Larry,
The field I'm working on is originally set as integer in SQL server.I only have 2 choices as far as changing the datatype so that it will take decimal entry and they're either float or decimal datatype. Unless there are others that I'm not familiar with.

Once I changed to either float or decimal ( in SQL Server side ) than in access's field property I can do a format for the field in question and the choices are:
- general number
- fixed
- standard
- currency
- percent and
- scientific

I've tried to match float with general number, fixed and standard all did not work.

I am wondering if I need to set something on reference window instead of matching this datatype or something else that I'm not aware of at this time because I'm really new with access and VBA. - Alec


 
The property you're looking at is for display purposes. You need to change the number type from Long Integer to Double.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top