I need to have fields on a form to all be upper case and saved to the table in upper case.
I created the following function:
Function UpperCase(Name As String) As Variant
On Error GoTo PROC_ERR
Dim strName As String
strName = Name
Name = UCase(strName)
PROC_EXIT:
Exit Function
PROC_ERR:
MsgBox Err.Description
Resume PROC_EXIT
End Function
I want to call it from the OnExit of the field on the screen.
I have entered = Uppercase(fieldname) in the OnExit of the field I would like to have as upper case.
Can anyone tell what I am doing wrong?
I created the following function:
Function UpperCase(Name As String) As Variant
On Error GoTo PROC_ERR
Dim strName As String
strName = Name
Name = UCase(strName)
PROC_EXIT:
Exit Function
PROC_ERR:
MsgBox Err.Description
Resume PROC_EXIT
End Function
I want to call it from the OnExit of the field on the screen.
I have entered = Uppercase(fieldname) in the OnExit of the field I would like to have as upper case.
Can anyone tell what I am doing wrong?