set a field to accept only numbers

M

Meg

Is there a way in Infopath to set a field to accept only numbers?

My DB is in Access and I have that field set up as a number field.

I am using InfoPath 2007, however this application (form) was created in
2003 ver.

Thanks,

MEG
 
S

Swathi (GGK Tech)

Hi,

You can change the data type to Whole number (integer) as Shiva said. If you
don’t want to change the data type then add a data validation to accept only
numbers. For this add the following expression in the data validation.
not(xdUtil:Match(string(.), "\d*"))
 
M

Meg

Thanks, this worked.

MEG

Shiva (GGK Tech) said:
Hello,

You have to add the field data type is integer then automatically if you
enters other than integer value it will gives error message. If you want to
restrict only enters positive numbers then add the validation.
 

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