B
BillyRogers
I have a field in a table and I want to require the user to enter a 10 digit
number. How do I do this?
Thanks
number. How do I do this?
Thanks
Allen said:If you just want to *display* the leading zeros, then set the Format
property of the field to:
0000000000
If you want to *store* the leading zeros, use a Text field, with an input
mask like above.
If you want to permit alpha characters, set the Validation Rule of the field
to:
Len([Field1]) = 10
substituting your field name for "Field1".
I need it to be ten digits so it matches up to invoice numbers in
another database.(this table is to store customer credit requests). I
created the table a few months ago but have realized that people keep
forgetting to enter the leading zeros.
Tim said:be nice to your users and stick in the zeroes in the report/
query:
SELECT RIGHT(("0000000000") & InvNumString, 10) AS
FormattedInvNumString
FROM etc etc
If you are using the invoice number as a foreign key in other tables
(which is pretty likely), you may find the db works better using a Long
integer instead
The inv number is the foreign key that I link to the orders table to
i can match the order info to the refund request info.
The invoice number is a text field in the MySQL table that i link to
Tim said:... and will almost certainly work much better as a number than a text
string.
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.