Referencing a Custom Toolbar

  • Thread starter Thread starter Gibson
  • Start date Start date
G

Gibson

How do I reference the tag property of a toolbar control. Using Access2003
I have created a toolbar that lists forms. Click on the form name, the
current form closes and opens the chosen form. I would like to do some
things via code based upon the Tag value for control on the toolbar. How do
you referenc the Tag property of the toolbar option?

Thanks
 
Something like this...

Dim cbrCtl As Variant

Set cbrCtl = CommandBars("My CommandBar").Controls("My CommandBar Control")

If cbrCtl.Tag = 1 Then
'Do this
Else
'Do that
End if

Controls may have controls themselves, so, if the control you are
interrogating is nested several levels, you'll have to code for that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top