Clng ()function

  • Thread starter Thread starter Allison
  • Start date Start date
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???
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top