Clng ()function

A

Allison

How do I use the Clng ( ) funtion with the following?
Inside the query critiera or inside table design:

I want my numbers to appear in my table and to
00139 look like this:
01833 139
01752 1833
1752


Can you provide an example???
 
D

Douglas J. Steele

Assumng your table is named MyTable, and the text field in question that
contains the numbers is named MyTextField, the following will return the
value as a number:

SELECT CLng([MyTextField]) FROM MyTable
 
S

Steve Schapel

Allison,

I think the newsreader wordwrap on my computer has made it difficult for
me to be sure what you really want. But here are a few comments than
might help...
- Since you don't normally use/look at the data in tables anyway, the
way the data appears is normally irrelevant.
- If your date is a number data type e.g. 139, you can't make it look
like 00139 on your forms and reports by using the Format function, for
example Format([NameOfYourField],"00000")
- If your data is a Text data type, and you want to use it as numerical
values, use the Val() function, e.g. Val([NameOfYourField]) so for
example 00139 would become 139
- CLng is probably not applicable to your situation
 
Top