Hi
I Have Created ShortMnu1 And Use In Button Click Event ( Created Successfully ) But OnAction Method Just When Created Will Be Worked
Another Question How Can Add Seperator Between Control Buttons
Dim Mnu
Dim CbarBtn1
If Commandbars("ShortMnu1").Name="ShortMnu1" Then Commandbars("ShortMnu1").Delete
Set Mnu=Commandbars.Add("ShortMnu1",msoBarPopup,,True)
Set CbarBtn1=mnu.Controls.Add msoControlButton
CbarBtn1.Caption="Report1"
CbarBtn1.OnAction="=MyFunc()"
Have I Mention Form ' s reference ? Like
.OnAction=MyFunc("Forms!Form1")
Or
.OnAction="MyFunc(Form1)"
And For Seperator Using CbarBtn1.Controls(1).BeginGroup=True?
��������������
Function MyFunc()
Docmd.OpenReport "Report1",acViewPreview
End Function