Results 1 to 5 of 5
  1. #1
    tc197 is offline Advanced Beginner
    Windows 7 32bit Access 2003
    Join Date
    Jun 2014
    Posts
    69

    Using an input mask with a default value

    Hey guys,

    Is there a way to use an input mask that also has a default value? I have an input mask of !A\-00\-000;0;_ which gives me _-__-___. I would like it to default to J-__-___ but with the option to change the J when the data is being entered. I tried using a default value but was getting conflicting errors and such from the input mask. The reason behind this is that this is a product number and the first space (the J) indicates the year the product was made. For 10 months out of the year the J will always be a J but in Dec/Jan there is some overlap where half the data is entered as J and the other half might be K.



    The input mask works fine on it's own right now but if possible the people filling out the form want to have the J auto fill but have the option to change it at anytime. The only thing I've been able to get is J-__-___ where the J can't be edited, or just a J with no more input mask. I appreciate the help!

  2. #2
    tc197 is offline Advanced Beginner
    Windows 7 32bit Access 2003
    Join Date
    Jun 2014
    Posts
    69
    Could I some how create a toggle button that turns the prefill from the default value on and off? Say for example theres a little check box that says" Uncheck to disable autofill" and then it turns the default value off and I can manually fill the J's, while maintaining the input mask?

    Or how about a toggle button that turns the "J" part of the input mask on and off and I just leave a default value out all together?

  3. #3
    tc197 is offline Advanced Beginner
    Windows 7 32bit Access 2003
    Join Date
    Jun 2014
    Posts
    69
    nevermind I'll work around it

  4. #4
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Hi -

    On solution might be to keep the "J" as a non-editable part of the input mask, but have a checkbox or command button that will actually change the mask, i.e. me![textboxname].inputmask = "\J\-00\-000;0;_"

    John

  5. #5
    tc197 is offline Advanced Beginner
    Windows 7 32bit Access 2003
    Join Date
    Jun 2014
    Posts
    69
    Quote Originally Posted by John_G View Post
    Hi -

    On solution might be to keep the "J" as a non-editable part of the input mask, but have a checkbox or command button that will actually change the mask, i.e. me![textboxname].inputmask = "\J\-00\-000;0;_"

    John
    I was looking for just that. Thank you!

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

Similar Threads

  1. Input mask
    By scorpion99 in forum Access
    Replies: 4
    Last Post: 02-21-2014, 02:18 AM
  2. Input mask or expression
    By data808 in forum Forms
    Replies: 9
    Last Post: 01-28-2014, 02:41 AM
  3. input mask
    By slimjen in forum Forms
    Replies: 7
    Last Post: 10-07-2013, 03:20 PM
  4. Input Mask
    By qbc in forum Access
    Replies: 2
    Last Post: 01-20-2012, 03:27 PM
  5. Input mask
    By doobybug in forum Access
    Replies: 2
    Last Post: 06-17-2009, 09:40 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