Standard format in VBA without decimals

Skaapn

New member
Local time
Today, 03:22
Joined
Jun 8, 2012
Messages
4
Hello,

I am trying to to convert a number to a 'Standard' Format, example: 1234 = 1.234
However, when i use the code below i still get 2 decimals.
Code:
Format([TachostandLookup], "Standard")
And when i use this code i get a non formatted number + ',' at the end
Code:
Format([TachostandLookup], "#.####")
I would appreciate any help :D
 
Try this:
In the Table (for this field) put: Data Type = Number, Format = #.###
In the Form (for this field) put: Format = #.###
 
Try this:
In the Table (for this field) put: Data Type = Number, Format = #.###
In the Form (for this field) put: Format = #.###

Thanks for your reply!

In the table the value is formatted correctly.
I just cant get the same formatted data into a variable.

I use this code to put the data into a textbox
tb_date = Format(bouwjaarmaandLookup, "mm/yyyy") + " - " + Format([TachostandLookup], "#.####") + " " + KMMijlLookup
If i format 'tb_date' as #.###, it just adds a few spaces before the actual text.


Edit: Setting #.#### as format for a textbox works, however i am not using a single value as control source for my textbox, therefore it doesn't work.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom