Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2010

    Unanswered: input mask / format trouble

    Hi - thanks for reading -
    I haven't had the opportunity to work custom input masks and formats in my access forms in awhile.
    I spent about 2 hours trying to get this to work today, but couldn't get it to stick!
    I have tree fields in a form that save to a table that I want to view in a particular format and save in the same format.
    They have literal numbers or text. I tried quotes, backlash, and every placeholder from 0, #, & in both format and input mask and never got expected result.

    Can anyone put me in the right direction as to what my format and my input mask should be to get these results, I show the data type and format that is in the underlying table :
    1.) Acct number - Number, general - 6 digit number leads with 34 every time, need to display and save i.e. 342002, 348154, 341179, 340660
    user requirement will be to enter the last 4 digits
    2.) Order number - short text, @ - 8 digit number leads with 340 every time, with an optional -00, need to display and save i.e. 34037488, 34035796-07
    user requirement will be to enter 5 digits (after the 340) and ending there or -00, -01, etc for back order
    3.) Invoice Number - short text, @ - 10 character letter/number combo....leads with IN0 every time, need to display and save i.e. IN05303100, IN05303101
    use requirement will be to enter last 7 digits (after the IN0)

    thank you!!

  2. #2
    weejas is offline Grumpy old man (training)
    Join Date
    Sep 2006
    Surrey, UK
    Provided Answers: 17
    First of all, why are the users entering values that ought to be generated by the system?

    Input masks work best on text values. As a starter, here's what I've managed for your account number:
    Data type - Text
    Field size - 6
    Input mask - "34"0000;0;0

    I did originally try with data type number (decimal(6,0)), but when I entered "0001" into the field and tabbed out of it, the cell displayed it as "34 1", which was not ideal.

    For the order number, I'd suggest splitting it into two fields (order number and back order sequence, or whatever the trailing digits represent). Then you could modify the account number field settings, and combine the values from both fields for printing and display purposes. I don't think that you can create an input mask that will cope with "34012345" and "34012346-01", unless you're happy for the former to be saved as "34012345-".

    For the invoice number, again you can just modify the account number field settings.
    10% of magic is knowing something that no-one else does. The rest is misdirection.
    Beers earned: 2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts