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.
 
Back
Top