Results 1 to 6 of 6
  1. #1
    staccee is offline Novice
    Windows 7 32bit Access 2013 32bit
    Join Date
    Mar 2016
    Posts
    2

    Input Mask Question

    I created an input mask for the case number (basically includes a dash). It worked great for several months and still shows up in my form accurately. But in my table the older case numbers show up with the correct formatting (input mask), yet the newer cases no longer show the dash. But if I click in the cell the dash is there. It's just not showing up unless I click in the cell. Also when I run a report the older cases show the correct format while the newer ones don't. Any suggestion on how I can get the correct input to show up correctly on all of my cases? The input mask in the table (design view) is correct.

    Thanks!

  2. #2
    vicsaccess's Avatar
    vicsaccess is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    451
    Sorry Staccee i don't use input mask that often but i did remember reading a post lately about it. maybe this will help a little https://www.accessforums.net/showthr...ght=input+mask

  3. #3
    NTC is offline VIP
    Windows 7 64bit Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    when invoking one of the pre-made masks (i.e. SSN, Tel, Password, etc) one is given the option to either store the data without the symbols or with the symbols... i.e. for telephone just the number 5553331234 versus (555) 333-1234 where the latter includes the ( ) - in the table... so fundamentally the stored info and the viewed info can differ..... it sounds like what is now storing is not consistent with the past data and so you need to remake your mask as well as convert the new data....

    not sure if you used a premade mask or made your own, and it is not clear whether you are doing this at the table level or the form level....

  4. #4
    staccee is offline Novice
    Windows 7 32bit Access 2013 32bit
    Join Date
    Mar 2016
    Posts
    2
    Ok so how do you convert the data?

    Thanks!

  5. #5
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    The fact that you can click on a field and see the dash suggests that you have a format set for that field as well as an input mask. IMO you shouldn't have either an input mask or a format set at the table level - input and viewing should be done through forms, with the mask and format on the form controls.

    If you want to see what is actually in the table, delete the input mask and format values in design view, then open the table.

    If the format of the data is consistent, i.e. the dash is always in the same place, an update query could be used to fix it.

  6. #6
    NTC is offline VIP
    Windows 7 64bit Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    agree with JG; in general masking at table level not a good idea except true password masking that you don't even want the admin to see... otherwise keep it at the form level

    so assuming you have 2 different formatted sets of data in the same table field/column; the fix on this is really dependent upon how many are incorrect. If it is a small number - then a manual retype could be viable. If it is a large number then one must set up a 1 time update query. It would be a 2 step process where query 1 is for isolating the incorrect records, and then reformatting them in a new calculated field. query 2 then uses query 1 to update the table

    reformatting strings is going to use a set of VBA functions in the calculated field: InStr, Right, Left, Mid, Len - this 5 functions used appropriately can typically modify any string that has a consistent pattern in its character layout...

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 Question
    By data808 in forum Forms
    Replies: 3
    Last Post: 01-15-2014, 12:44 AM
  3. input mask
    By slimjen in forum Forms
    Replies: 7
    Last Post: 10-07-2013, 03:20 PM
  4. Input Mask Question
    By MM12 in forum Access
    Replies: 2
    Last Post: 09-10-2012, 11:03 AM
  5. Input Mask
    By qbc in forum Access
    Replies: 2
    Last Post: 01-20-2012, 03:27 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