ListO
Señor Member
- Local time
- Today, 15:10
- Joined
- Feb 2, 2000
- Messages
- 162
Greetings to all
I've searched and hunted and experimented, but to no avail...
From a pop-up form, I would like to update the property of a label on one of several other forms. The circumstances of the moment will determine which form's label is getting updated.
I can't figure out how to reference a form using a variable name. The code I'd like to use is something like
Unfortunately, Access wants strFormName to be the literal name of the form, not a variable which contains the name. I've tried using
This doesn't work any better, and I can't figure how to assign a varying name to that form.
Am I asking the impossible?
I've searched and hunted and experimented, but to no avail...
From a pop-up form, I would like to update the property of a label on one of several other forms. The circumstances of the moment will determine which form's label is getting updated.
I can't figure out how to reference a form using a variable name. The code I'd like to use is something like
Code:
Private Sub Cant_Figure_This()
Dim strFrmName as string
(various code which changes the value of
strFrmName to be the name of a particular
form which I want to alter)
Forms!strFrmName.Label1.Visible = True
End Sub
Code:
Dim FrmName as Form, strFrmName as String
FormName = Forms!strFrmName
Am I asking the impossible?
Last edited: