Results 1 to 11 of 11
  1. #1
    MSAnewbie is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2015
    Location
    AB Canada
    Posts
    5

    MV Licence Plate - field

    I'm using ms access 2010 database. The field for data input for vehicle licence plate in field properties both in Format and Input Mask is shown as "xxx xxx". I was trying to change the field size by 1 character at the end; using the same parameter I input "xxx xxxx" but it didn't work. Then I used the valid characters and tried this: !>LLL-0000 using the wizard, but again it didn't work. Please advise, thx a mil.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    dont apply valid characters on the table, validate this on the form text box.
    to eliminate problems such as the one you describe.

  3. #3
    MSAnewbie is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2015
    Location
    AB Canada
    Posts
    5
    The Licence Plate Numbers in Alberta for older plates are AAA 123, and for the new plates AAA 1234. I am new to Access and I am lost in how to modify to make room for the new plate numbers. Alternatively, I suppose I could start a new field to handle the new plates that continue using the alphanumeric style in which Alberta added 1 more number to the numbered end? If there is a way to keep the original field and make it accept the new plate numbers that would be great. Any suggestion?

  4. #4
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    You almost had it. Try this for the input mask: !>LLL-0009

    Using the "9" instead of "0" as the last character in the mask means the last character is optional, but must be a digit.

  5. #5
    MSAnewbie is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2015
    Location
    AB Canada
    Posts
    5
    Thx for the t-r-y John G. Unfortunately, it didn't work. As I indicated in the opening, the original input mask show as "xxx xxx" and I have no idea why that works, but only for the 6 alphanumeric plate AAA 123. Is it necessary to use coding of some sort to make it happen? I am not familiar with vba coding.

  6. #6
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    1) What do you mean by "it doesn't work"? What error message do you get?

    2) Where are you setting the input mask property - on a form or in the table field properties? I don't recommend putting a mask on the table field properties, since you shouldn't be entering data directly into a table anyway - always use a form.

    3) Are you sure the field size in your table is big enough to accomodate that extra character? What is the current setting?

    4) Try the mask as >LLL\ 0009 You don't need the ! because the data is left-justified anyway in a text field. The \ causes the following blank to be displayed as well - you do not have to explicitly type one.
    Last edited by John_G; 12-23-2015 at 08:39 AM. Reason: additional information

  7. #7
    MSAnewbie is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2015
    Location
    AB Canada
    Posts
    5
    Missing info: the db above is for fleet management and is used with Switchboard interface for data entry. Perhaps the >LLL\ 0009 doesn't work because the switchboard interface 'licence plate input box' has to be changed too to fit the extra number?

  8. #8
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    A switchboard is just a form (and there is nothing special about it) which happens to be designed and maintained by the switchboard manager, and from what I have seen of it, does not itself have a data entry interface - it opens another form to do the data entry.

    But please answer the question - when you say the input mask doesn't work, what is the error message, if any, and what does it allow or not allow you to do?

    But you are right in that any form text box that requires the input of the license number will need to have the input mask changed.

  9. #9
    MSAnewbie is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2015
    Location
    AB Canada
    Posts
    5
    The answer is: after I got the input mask changed to >LLL\ 0009 and tried to input a plate number ABC 1234 the form accepts the six number but not the last number and makes a short 'ping' sound. No error message.

  10. #10
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Very odd - the short ping I think indicates it doesn't like the "4", but there is no obvious reason the form should not accept the 7 characters.

    Can you post a cleansed version of your database for analysis? (a zipped version is OK)

  11. #11
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I did some testing and I don't have any problem entering 3 or 4 numbers.

    This is what I did:
    In the table design, ensure that the license field length is 8 (or more) - 3 letters, 1 space, 4 numbers.
    Do not set the format or input mask here.

    In the form design view
    Format Tab - do not set a format.
    Data Tab - as John_G said, set the input mask for the license text box control to ">LLL\ 0009" (no quotes).
    Save the form.

    Enter test data....

    NOTE:
    The license data is NOT stored with a space. In the form, because of the input mask, the license number IS displayed with a space.

    I have noticed there is a conflict between the Format property and the Input Mask property.
    So I will set the input mask in a control for entering data and use the Format function when displaying data in a form (if display only) or report.

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

Similar Threads

  1. Replies: 6
    Last Post: 06-26-2015, 08:55 PM
  2. Replies: 17
    Last Post: 03-16-2014, 10:52 PM
  3. Replies: 3
    Last Post: 12-27-2013, 02:33 PM
  4. Replies: 1
    Last Post: 03-03-2012, 10:17 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