Consulting

Results 1 to 5 of 5

Thread: Inputmask on inputbox?

  1. #1

    Inputmask on inputbox?

    can I apply input mask to inputbox?

    I need to apply date format (dd-mmm-yyyy) in inputbox. is this possible?

    cheers
    R

  2. #2
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    I don't know of any way. Have you considered a normal Form or Pop-Up/Modal Form which would provide total control of the field for entering the data?

  3. #3
    VBAX Master CreganTur's Avatar
    Joined
    Jan 2008
    Location
    Greensboro, NC
    Posts
    1,676
    Location
    InputBoxes do not have any native masking properties that I am aware of. Tony's suggestion of creating a custom form to serve as your input box is probably your best bet.

    Just use a regular Textbox on your form and use the Password Input Mask- it's on the Data tab of the properties sheet.
    -Randy Shea
    I'm a programmer, but I'm also pro-grammar!
    If your issue is resolved, please use Thread Tools to mark your thread as Solved!

    PODA (Professional Office Developers Association) | Certifiable | MOS: Access 2003


  4. #4
    VBAX Master CreganTur's Avatar
    Joined
    Jan 2008
    Location
    Greensboro, NC
    Posts
    1,676
    Location
    Okay, I did a little more digging and I was right- there is no native way to mask the input of an input box. The fastest and easiest way to accomplish what you want is with a form you can use in place of the InputBox.

    However, it is possible to mask the input of an input box using API to hijack the keystrokes from the inputbox, load them into a variable, and force masked characters into the inputbox. You can see how to do this here. However, you're using 200 lines of code to duplicate what a form could do with fewer system resources and no API calls.
    -Randy Shea
    I'm a programmer, but I'm also pro-grammar!
    If your issue is resolved, please use Thread Tools to mark your thread as Solved!

    PODA (Professional Office Developers Association) | Certifiable | MOS: Access 2003


  5. #5
    hi All,

    I know i can achieve it by creating another form but i was just trying my luck if there was a solution with inputbox.

    by using inputbox i don't need to spend my time creating a form and code the textbox..

    thanks for the confirmation.. will try the form then..

    cheers
    R

Posting Permissions

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