Pointing to object on form

michelle

New member
Local time
Today, 22:51
Joined
Mar 13, 2000
Messages
5
Dear access users,

Normally we change the text on a command button with the next source:

Forms![FrmHead]![Command1].Caption = “Test”

Is it possible, with the help of a variable, to point to the object ‘Command1’

For example:

StrA = ”Command1”
Forms![FrmHead]![strA].Caption = “Test”

This don’t works, can someone give any source to do this?

Nice regards,

Michelle
 
Michelle,

I don't have Access on this machine so the syntax will be a
bit iffy.

Forms![FrmHead].Controls("Command1").Caption = "..."

hth,
Wayne
 
Hello Wayne,

Your information is working correctly. Thanks a lot.

Happy Christmas for you and you all.

Nice regards,

Michelle.
 

Users who are viewing this thread

Back
Top Bottom