K
KaiRich
Hi Dave,
Problem: Identify open form (switchboard), change label
value.
This code is based on a command button click, but will
work in other situations - I just wanted to test it before
giving it to you.
This reads what form has the focus (I hope that equates
to 'which one is open' for you), it stores the name of the
focussed form, it changes the unbound label - and then it
displays a message box just to debug.
Sub cmdButton_Click()
Dim CurrentSwitch As Form
Set CurrentSwitch = Screen.ActiveForm
lblTempStore.Caption = CurrentSwitch.Name
MsgBox "Current Form: " & CurrentSwitch.Name
End Sub
Regards,
Kai
switchboards differently, but I do not know how to
identify which switchboard is open and then update the
unbound label containing the text.
Problem: Identify open form (switchboard), change label
value.
This code is based on a command button click, but will
work in other situations - I just wanted to test it before
giving it to you.
This reads what form has the focus (I hope that equates
to 'which one is open' for you), it stores the name of the
focussed form, it changes the unbound label - and then it
displays a message box just to debug.
Sub cmdButton_Click()
Dim CurrentSwitch As Form
Set CurrentSwitch = Screen.ActiveForm
lblTempStore.Caption = CurrentSwitch.Name
MsgBox "Current Form: " & CurrentSwitch.Name
End Sub
Regards,
Kai
switchboards. I would like to identify each of the-----Original Message-----
Clear DayI have an application that contains multiple
switchboards differently, but I do not know how to
identify which switchboard is open and then update the
unbound label containing the text.