Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / November 2005

Tip: Looking for answers? Try searching our database.

Validation Text Problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sam Solomon - 17 Nov 2005 11:11 GMT
Dear All,

I am  using a validation rule ^[0-9]*$ in my TextBox on Access form which
allows only Numbers to be entered in the TextBox. How ever it doesnt seem to
be working.And I am geting "Please enter Numbers only" validation text every
time I enter anything in the textbox.

Any idea whats going on.

cheers,
Sam Solomon
John Spencer - 17 Nov 2005 13:05 GMT
Perhaps (untested)
   <>"*[!0-9]*"
will work for you.

> Dear All,
>
[quoted text clipped - 9 lines]
> cheers,
> Sam Solomon
Van T. Dinh - 17 Nov 2005 13:16 GMT
It may be simpler to use the TextBox_BeforeUpdate Event and check whether
the entry is numeric or not using the IsNumeric() function.

Signature

HTH
Van T. Dinh
MVP (Access)

> Dear All,
>
[quoted text clipped - 9 lines]
> cheers,
> Sam Solomon
John Spencer - 17 Nov 2005 14:11 GMT
IsNumeric is generally accurate, but there are exceptions to the rule of
only numbers.

IsNumeric("1d10") is True
IsNumeric("1e10") is True
IsNumeric("-10") is True

I usually use a custom function to check each character in the string using
IsNumeric.

> It may be simpler to use the TextBox_BeforeUpdate Event and check whether
> the entry is numeric or not using the IsNumeric() function.
[quoted text clipped - 12 lines]
>> cheers,
>> Sam Solomon
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.