Private Sub TestFormCode()
Dim ctl As Control
Dim frm As Form
Set frm = Forms("frmMyForm")
Set ctl = frm.ActiveControl
If Not Trim(ctl & " ") = "" Then
ctl = StrConv(ctl, vbProperCase)
End If
Set ctl = Nothing
Set frm = Nothing
db.Close
Set db = Nothing
End Sub