Toolbar function

  • Thread starter peljo via AccessMonster.com
  • Start date
P

peljo via AccessMonster.com

I wanted to build a toolbar function in the form, but after clicking on the
button, in the form of an arrow, the error says that no such function exists.
Where could the error be ?

Private Function ToolbarWar()

Dim cbr As Object
Dim cbb As Object
' msoBarTop = 1
Set cbr = CommandBars.Add(Name:="ToolbarWar", Position:=1, Temporary:=True)

Set cbb = cbr.Controls.Add(Type:=1, Temporary:=True)
With cbb
.Caption = "My Button"
.FaceId = 41
.Width = 60
.FontSize = 250

.OnAction = PRR
End With

End Function

Private Function PRR()
DoCmd.Close
End Function
 

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

Top