Share via

All Caps Input Mask

Anonymous
2013-08-02T20:17:36+00:00

I used the ">" format on my Postal Code Field to ensure that the letter portion of the code be capitalized.

This works perfectly in the table but once the field is used in a query, it reverts to uncapitalized version...is there any way to prevent this?

Melissa

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2013-08-02T20:51:13+00:00

That merely formats the value, it does not change it to upper case.  To convert input to upper case put the following in the control's KeyPress event procedure:

   Dim strCharacter As String

   ' Convert ANSI value to character string.

   strCharacter = Chr(KeyAscii)

   ' Convert character to upper case, then to ANSI value.

   KeyAscii = Asc(UCase(strCharacter))

Data input must be via a form of course, which should in any case always be so, never in a table's or query's datasheet.

Was this answer helpful?

0 comments No comments

6 additional answers

Sort by: Most helpful
  1. Anonymous
    2013-08-07T01:03:48+00:00

    How about using the subforms BeforeUpdate?

    Private Sub Form_BeforeUpdate(Cancel As Integer)

        Me.txtZipCode = UCase(Me.txtZipCode)

    End Sub

    I would still use the Input Mask, but add the Forms BeforeUpdate to upper case the data.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2013-08-06T21:23:49+00:00

    If you use datasheets as the interface for data input, then you are severely limited in the degree of control you can apply.  This is one reason why data should never be input in this way, but by means of forms/subforms.  The limitation on physical page size should not be relevant as printing data should be by means of reports.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2013-08-06T14:32:32+00:00

    I think I solved the particular incidence where the postal code was showing up in the wrong case by editing the input mask in the query as well.

    Hopefully, this will be enough so I can keep using my Subdatasheet compillation as I have been.

    Melissa

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2013-08-06T14:10:55+00:00

    This could be a bit of a problem since my minister data entry form is really just a compilation of subdatasheets. Oops. Is there any way around this? It was the only way I could get all the information visible on one legal-size page.

    Was this answer helpful?

    0 comments No comments