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!

DLookup looses decimals when updating bound ctrl 1

Status
Not open for further replies.

MCesic

Technical User
Mar 6, 2005
35
0
0
HR
I have a very very anoying problem and haven't yet found a solution.
I have a form, bounded, and on "event" (gotfocus, click, or whatever) the DLookup method is triggered (among others). It populates a bounded txtbox with a number, it is formated "Standard" with 2 decimals. But I lose the decimals and the number is stored in table (and displayed in txtbox) as "rounded" (100,00 instead of 99,5 for example).
I've even tried to make a completly new form. With just one cbobox and one textbox. This way works until I bound the txtbox to a field in table.
And then I tried putting the format on field in table as "Standard" with 2 decimals, and also in Control's format.. but no luck.
Anyone have an idea what I'm missing?

Thanks vy much!!

greets,
Marko 9A6NCM

 
it looks like your data is being cast to an integer for some reason...

try using doubles for all related variable declarations

--------------------
Procrastinate Now!
 
Great Great !!
Thanks! it was that!

I've never had problems like that so had no chance to figure it out on my own. :)

Many thanks for quick post.

greets,
Marko 9A6NCM

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top