D
DanJ
I am working on an existing database that has over 500 forms in the front-end
and is linked to various back-end databases (some Access, some SQL Server,
some MSDE, etc.) I have a customer who has bought the application, but wants
all the data to be entered in uppercase automatically for all forms. I know
that I could set input masks on the controls to do this OR set the following
code in the keypress event of the form or control:
Private Sub Form_KeyPress(KeyAscii As Integer)
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))
End Sub
However, with all the forms and controls, I am wondering if there is a way
to write code that will do this at the application level (i.e. at Startup or
via a Splash form). Ideally, at startup, the program would look at a
"preferences" table, and set the entire project to use uppercase or normal
case depending on the preference setting.
Does anyone have an idea how to do this in Access VBA?
Dan Joosten
and is linked to various back-end databases (some Access, some SQL Server,
some MSDE, etc.) I have a customer who has bought the application, but wants
all the data to be entered in uppercase automatically for all forms. I know
that I could set input masks on the controls to do this OR set the following
code in the keypress event of the form or control:
Private Sub Form_KeyPress(KeyAscii As Integer)
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))
End Sub
However, with all the forms and controls, I am wondering if there is a way
to write code that will do this at the application level (i.e. at Startup or
via a Splash form). Ideally, at startup, the program would look at a
"preferences" table, and set the entire project to use uppercase or normal
case depending on the preference setting.
Does anyone have an idea how to do this in Access VBA?
Dan Joosten