Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    Nov 2003
    Location
    London, Gtr London, England
    Posts
    222
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Input Mask disappearing chr (2003 (11.6566.8036) SP2)

    Hi there!

    I have an input mask that effectively states the first character in a supplier ref:- "C" and then allows input of 4 alpha then 3 numeric characters.

    Mask set in VB as With Me.Supp_Ref.InputMask = ">CLAAA000;_"

    The second character in the ref is tested in Before Update for being a "C" or "P". If I enter "P" (or any other alpha character other than "C") then complete the rest of the ref and move to the next field the ref remains as displayed on screen (i.e. CPABC123).

    If I enter "C", complete the ref (i.e. CCPABC123) and then move to the next field, the field display drops either the first or second "C" and truncates to 7 characters (i.e. CABC123).

    I'm somewhat puzzled as to what's going here, and can't fathom out how to fix, so if someone can point me in the right direction, I would be most grateful!

    Cheers,

    Niven

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Input Mask disappearing chr (2003 (11.6566.803

    Change the mask to:

    >CLAAA000;0;_

    The extra 0 in the middle tells Access to store the literal.
    Regards
    John



  3. #3
    3 Star Lounger
    Join Date
    Nov 2003
    Location
    London, Gtr London, England
    Posts
    222
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Input Mask disappearing chr (2003 (11.6566.803

    Ah! So simple!

    It might be me, but I couldn't and still can't, seem to see anything in the Microsoft Help menus about this. Cheers for being in the know.

    Many thanks,

    Niven <img src=/S/bravo.gif border=0 alt=bravo width=16 height=30>

  4. #4
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Input Mask disappearing chr (2003 (11.6566.803

    I looked up in a book, but I have now gone searching in Help.

    I find Help much more helpful if you search from the VBEditor (because it is searching for help with VBA)

    So i did not find anything when I looked in standard Access Help, but the moment I searched from the Editor I found this:
    Regards
    John



  5. #5
    3 Star Lounger
    Join Date
    Nov 2003
    Location
    London, Gtr London, England
    Posts
    222
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Input Mask disappearing chr (2003 (11.6566.803

    That was right under my nose and I completely missed its meaning!

    What threw me was I didn't expect the initial "C" to disappear when a "C" was entered in the 2nd position, but when another chr was entered in position 2 for it to remain in the display. I knew it had something to do with the the "C" at the start but misunderstood what section 2 was saying.

    Cheers again,

    Niven

  6. #6
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Input Mask disappearing chr (2003 (11.6566.803

    I agree that it is a bit of mystery why you lost a C in one case, but not in the other.
    Perhaps it just got confused.
    Regards
    John



Posting Permissions

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