Results 1 to 5 of 5
  1. #1
    alex_raju is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    56

    Question validation; allowed only digits in text control?

    hi,



    how to make valid only digits in ms access text control?

    [txtproductid]

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Hi
    You could try setting the "Format" property of the textbox to something like General Number.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    alex_raju is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    56


    actually ,i want if input except digits event should be cancel

  4. #4
    alex_raju is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    56
    exactly this function " Is Null OR Not Like "*[!0-9]*" " but in vb code

  5. #5
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Hi

    In that case I would use the BeforeUpdate event of the textbox. You may want to use the inbuilt functions IsNumeric and IsNull to check what has been typed into the textbox and set Cancel if they return false.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 05-24-2011, 08:19 AM
  2. Not Allowed To Run Delete Query
    By batowl in forum Queries
    Replies: 5
    Last Post: 01-27-2011, 03:43 PM
  3. Replies: 5
    Last Post: 12-26-2010, 10:56 PM
  4. Validation on identical text question
    By edrahl in forum Database Design
    Replies: 1
    Last Post: 02-26-2008, 09:38 AM
  5. Validation rule for a text field
    By wasim_sono in forum Forms
    Replies: 4
    Last Post: 03-14-2006, 11:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums