Results 1 to 10 of 10
  1. #1
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Frederick, Maryland, USA
    Posts
    296
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Input Masks (A2K SR-1)

    I've applied an ALL CAPS input mask (>CCCCCCCCCC....) to several fields in a table. Do I need to apply the same input mask to the fields in the associated form to ensure that all entries are in caps?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Input Masks (A2K SR-1)

    If you use a wizard to create a form based on a table, the text boxes will have the same format, input mask etc. as the fields they are bound to.
    The same holds for text boxes you create by dragging a field from the Field List window to the form.
    However, if you create an unbound text box by clicking the text box control on the Control Set, and then bind it to a field, you will have to set the format, input mask etc. properties manually.

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Edmonton, Alberta, Canada
    Posts
    326
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Input Masks (A2K SR-1)

    Just to make Hans's message perfectly clear, when you are creating a form with the wizard, the input masks will be copied from the table definition as it stands at that time. If you subsequently change the input masks in the table definition, you will also need to correct the form definition.

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wetherby, Yorkshire, England
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Input Masks (A2K SR-1)

    I find it easier to write code in the Afterupdate of the field:
    MyControl_AfterUpdate
    Me!MyControl = UCase(Me!MyControl)
    That way you don't need to guess at the max length of the string.
    Peter

  5. #5
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Frederick, Maryland, USA
    Posts
    296
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Input Masks (A2K SR-1)

    Peter,

    Using your method, will the text be written to the table in upper case, even if the form field does not have an upper case mask?

  6. #6
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Frederick, Maryland, USA
    Posts
    296
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Input Masks (A2K SR-1)

    Pete,

    Ignore my last message. I ran a test and confirmed that the data gets written to the table in uppercase. Thanks for the great suggestion!

  7. #7
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Frederick, Maryland, USA
    Posts
    296
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Input Masks (A2K SR-1)

    Pete,

    Sorry...another question. Does the table field (as opposed to the form field) need an all caps input mask for your method to work?

  8. #8
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wetherby, Yorkshire, England
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Input Masks (A2K SR-1)

    As an afterthought to my original advice - if you have a few controls to make capitals you can set it up as a function like this:
    Function Capitalise()
    Screen.ActiveControl = UCase(Screen.ActiveControl)
    end Function

    Then all you enter in the AfterUpdate property of each control is:
    =Capitalise()

    Peter

  9. #9
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Frederick, Maryland, USA
    Posts
    296
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Input Masks (A2K SR-1)

    Thanks, Peter.

  10. #10
    3 Star Lounger
    Join Date
    Jun 2001
    Location
    Maidstone, Kent, England
    Posts
    398
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Input Masks (A2K SR-1)

    Another point. If you use an > in the format property of a field it will display in Caps regardless of how the record was saved.

    HTH

    Peter

Posting Permissions

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