Results 1 to 5 of 5
  1. #1
    Kundan is offline Competent Performer
    Windows XP Access 2013 32bit
    Join Date
    Mar 2018
    Posts
    155

    Regarding Forms

    1)I want only integers to be entered into the TextBox. How should be the Input Mask & what should be the validation rule?
    2)I want a number with only 2 decimal places (eg. 12345.68) to be entered into the TextBox. How should be the Input Mask & what should be the validation rule?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    the Field Type is integer, you wont need a validation rule, it will only hold integers.

    same with 2 decimal, when the field is set to Single (or Double), 2 decimals , tho you may need to truncate.
    currency holds only 4 decimals.

  3. #3
    Kundan is offline Competent Performer
    Windows XP Access 2013 32bit
    Join Date
    Mar 2018
    Posts
    155

    Regarding Forms

    Quote Originally Posted by ranman256 View Post
    the Field Type is integer, you wont need a validation rule, it will only hold integers.

    same with 2 decimal, when the field is set to Single (or Double), 2 decimals , tho you may need to truncate.
    currency holds only 4 decimals.


    Thanks a Lot! GOD BLESS YOU!!!

  4. #4
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,974
    Just to add
    1. Integer has a limit of 32767. If you need more than that, use Long Integer instead
    2. Similarly Double allows far bigger numbers than Single.
    In both cases I recommend using Fixed format so e.g. 123.5 would be shown as 123.50 if using 2d.p.
    For more info, see https://ss64.com/access/syntax-datatypes.html
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  5. #5
    Kundan is offline Competent Performer
    Windows XP Access 2013 32bit
    Join Date
    Mar 2018
    Posts
    155

    Regarding Forms

    Quote Originally Posted by ridders52 View Post
    Just to add
    1. Integer has a limit of 32767. If you need more than that, use Long Integer instead
    2. Similarly Double allows far bigger numbers than Single.
    In both cases I recommend using Fixed format so e.g. 123.5 would be shown as 123.50 if using 2d.p.
    For more info, see https://ss64.com/access/syntax-datatypes.html

    Thanks! Thanks!! GOD BLESS YOU!!!

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

Similar Threads

  1. Replies: 7
    Last Post: 11-06-2017, 01:23 PM
  2. Replies: 2
    Last Post: 04-05-2016, 08:29 AM
  3. Replies: 3
    Last Post: 03-23-2016, 12:45 PM
  4. Replies: 2
    Last Post: 11-05-2014, 09:16 AM
  5. Replies: 5
    Last Post: 01-16-2013, 03:48 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