Results 1 to 5 of 5

Thread: Formatting Text as it is entered into textbox?

  1. #1

    Thread Starter
    Hyperactive Member Sal's Avatar
    Join Date
    Mar 2000
    Posts
    262
    In Access, you can setup input masks. As the user enters data into a particular field, the data complies with the input mask. For example, if you setup an input mask as the following date format (10/29/00), the slash is automatically presented. My desire is to setup a textbox, which the user can use to enter a specific time for an alarm. When the time is entered, I would like for the ":" to automatically be present. This would allow the user to just simply enter the numeric time without having to insert the colons. So, the user would say enter 122200 and the textbox would look like 12:22:00 after the text is entered.

    I have looked at the format function. And can't see how to integrate it like I would in Access(Microsoft Access).

    Any help of course is greatly appreciated!

    Sincerely,
    Sal

  2. #2
    PowerPoster BruceG's Avatar
    Join Date
    May 2000
    Location
    New Jersey (USA)
    Posts
    2,657
    Use the masked edit control (get it from Project --> Components)instead of a regular textbox. Set the Mask property to something like:
    ##:##:##

    For this app, you might also want to consider using the DTPicker (Date-Time Picker) control.

  3. #3

    Thread Starter
    Hyperactive Member Sal's Avatar
    Join Date
    Mar 2000
    Posts
    262
    Hey Thanks....gonna try it now.

    Sal

  4. #4

    Thread Starter
    Hyperactive Member Sal's Avatar
    Join Date
    Mar 2000
    Posts
    262
    Bruce,

    Great!

    The masked edit control worked, but like you said the DTpicker worked even better. (Once I figured out how to use it!)

    Sal

  5. #5
    PowerPoster BruceG's Avatar
    Join Date
    May 2000
    Location
    New Jersey (USA)
    Posts
    2,657
    Glad to be of service.

Posting Permissions

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



Click Here to Expand Forum to Full Width