Customer number - Long integer ?


S

SpookiePower

All my customers have six figures in there customersnumber.
I'm not sure what type that I should use for the customernumber-
field in the table. Integer holds only 5 figures and Lon integer
holds 10 figures, but that I think would be overkill I think.

I could also set the type to text and then set field size to six,
but I have to sort the customers by there customernumbers,
and sorting figures or text sort them in two differents way.

What can I do ? The easy part would be to set the type to Long Integer.
 
Ad

Advertisements

G

Guest

You'd probably be better off to go with a long integer for two reasons.
First, it will take less space to store the number (4 bytes per record)
versus the text data type, and the second one you've already mentioned:
easier sorting.

However, a customer number entered into a text field can be coerced into a
number using the Val function: Val([FieldName]). You can sort on that, if
required.


Tom

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________
 
Ad

Advertisements

S

SpookiePower

Tom Wickerath said:
You'd probably be better off to go with a long integer for two reasons.
First, it will take less space to store the number (4 bytes per record)
versus the text data type, and the second one you've already mentioned:
easier sorting.

However, a customer number entered into a text field can be coerced into a
number using the Val function: Val([FieldName]). You can sort on that, if
required.

Thanks. I did not know about the Val function, but maybe I keep using
the Long integer type.
 

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

Top