Allows anything to be entered in a numeric field
Allows anything to be entered in a numeric field
i have a very basic database with name, address, city, state and zip. i want base to reject anything but numbers in the zip field. i have the zip field set up as a numeric field,but i can enter text as well as numbers. what i want is for base to reject anything but numbers and tell user, numbers only in this field. thanks
OpenOffice Version 4.1.5 on Windows 10
-
- Volunteer
- Posts: 1547
- Joined: Wed Jun 24, 2015 12:56 am
- Location: Colorado, USA
Re: allows anything to be entered in a numeric field
The first time you encounter a zip code with a leading zero, you will regret your choice of storing zip codes as a numeric data type. It is better to store zip codes and phone numbers as text.
On a Base form use a Pattern Field control for the zip code field. On the General tab of the Properties: Pattern Field dialog set Edit mask to NNNNNLNNNN, Literal mask to #####-#### and Strict format to Yes.
For more information on Pattern controls see the LO Base Handbook, available from
https://documentation.libreoffice.org/e ... mentation/
On a Base form use a Pattern Field control for the zip code field. On the General tab of the Properties: Pattern Field dialog set Edit mask to NNNNNLNNNN, Literal mask to #####-#### and Strict format to Yes.
For more information on Pattern controls see the LO Base Handbook, available from
https://documentation.libreoffice.org/e ... mentation/
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11