B
Bill
Can't seem to get the syntax correct for the assignment
statement seen in Sub tbMov3_LostFocus. I need to
set the corresponding text box in the calling form after
focus moves from one control to another. (Only
pertinent code posted below)
Option Compare Database
Option Explicit
Dim strCallingForm As String
Private Sub Form_Open(Cancel As Integer)
Dim Atmp() As String
Dim strStartField As String
'============================================================
' OpenArgs contains the name of the "calling" form and the control name on
that form that
' currently has the focus, separated by a semicolon. There is a one-to-one
correspondance
' between the text box controls on the current and calling forms.
'============================================================
Atmp = Split(Me.OpenArgs, ";")
strStartField = Trim(Atmp(1))
strCallingForm = Trim(Atmp(0))
Me.Controls(strStartField).SetFocus
End Sub
-------------------------------------------------------------------------------------------
Private Sub tbMov3_LostFocus()
If Len(Trim(Me.tbMov3)) > 0 Then
Forms![strCallingForm].Form!Controls("tbmov3") = Me.tbMov3
End Sub
------------------------------------------------------------------------------------------
statement seen in Sub tbMov3_LostFocus. I need to
set the corresponding text box in the calling form after
focus moves from one control to another. (Only
pertinent code posted below)
Option Compare Database
Option Explicit
Dim strCallingForm As String
Private Sub Form_Open(Cancel As Integer)
Dim Atmp() As String
Dim strStartField As String
'============================================================
' OpenArgs contains the name of the "calling" form and the control name on
that form that
' currently has the focus, separated by a semicolon. There is a one-to-one
correspondance
' between the text box controls on the current and calling forms.
'============================================================
Atmp = Split(Me.OpenArgs, ";")
strStartField = Trim(Atmp(1))
strCallingForm = Trim(Atmp(0))
Me.Controls(strStartField).SetFocus
End Sub
-------------------------------------------------------------------------------------------
Private Sub tbMov3_LostFocus()
If Len(Trim(Me.tbMov3)) > 0 Then
Forms![strCallingForm].Form!Controls("tbmov3") = Me.tbMov3
End Sub
------------------------------------------------------------------------------------------