Set a Form reference from a string variable...

Randomblink

The Irreverent Reverend
Local time
Yesterday, 22:23
Joined
Jul 23, 2001
Messages
279
Code:
    Dim mstrForm as Form

    Set mstrForm = Forms!CStr(curButton.Tag)

The curButton is a label...
The curButton.Tag = "popfrm_BankEntries"

All I am trying to do is get the stupid mstrForm to equal the curButton.Tag... What am I doing wrong...?

I could swear I have done this before...
ARGH!
 
Use this:
Code:
Dim mstrForm as Form

    Set mstrForm = Forms(curButton.Tag)
The Tag-property already is a string. The result have to be:
Set mstrForm = Forms("popfrm_BankEntries")
 
You are not saying which form that the label is on though.




Code:
Dim mstrForm as Form

Set mstrForm = Me.curButton.Tag
 

Users who are viewing this thread

Back
Top Bottom