I've got a logon form with three entry controls.
There is also a timer to null out the controls if logon isn't completed.
Here is the code from the Form_Timer procedure:
Code:
Private Sub Form_Timer()
'** check if times has passed to accept, reset entries
Dim FldNm
Const nProc = "Form_Timer"
Call sAddStatus(Me, lCntl, nProc, lCntl(2, 3), 1)
If (Now - UserCdTm) * 86400 > lCntl(0, 10) Then
ValidLo = False
'If Me.ActiveControl.Name = "cbx_3_LangID" Then cbx_3_LangID.Undo 'this works but need all controls
FldNm = Me.ActiveControl.Name
'On Error Resume Next
Me.Controls(FldNm).Controls(0).Undo 'RTE 2467
On Error GoTo 0
cmb_3_Accept.Enabled = False
tbx_3_UserCd = Null
tbx_3_Password = Null
Me.TimerInterval = 0
UserCdTm = Now
tbx_3_UserCd.SetFocus
'Tbxs_Status = fTranltLang(TempVars!LoLangID, "3_StatusWaitLogon", "H")
Call sAddStatus(Me, lCntl, fTranltLang(TempVars!lolangid, "3_StatusWaitLogon", "H"), lCntl(2, 3))
End If
End Sub
RTE : The expression you entered refers to an object that is closed or doesn't exist
The line that does the .Undo for a specific control works.
However, I need the .Undo to work for any control that is active.
Maybe I have the syntax wrong on the line that is getting a RTE 2467?