Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use function with parameter in Custom Toolbar

Status
Not open for further replies.
Mar 27, 2002
168
NL
Access2000,
Customize toolbar
Add Menu
Add OnAction = UpdTable("tblCustomer")

referencing to
Function UpdTable(strTable as string)
select case strTable
case..
..
end select

I know how to reference to functions without parameters. But how can I give a parameter in the field OnAction?

Thnx in advance,
Gerard
 
I am not quite sure what you want, but if you want to handle menupoints, I use this:

Function MenuDis(MenuName, MenuHead, MenuPkt, OnOff)
On Error GoTo Fejl
Dim MyBar 'As commandbar
Set MyBar = CommandBars(MenuName)
With MyBar.Controls(MenuHead)
'.Controls(MenuPkt).Enabled = OnOff
.Controls(MenuPkt).Visible = OnOff
End With
MyBar.Visible = True
FejlExit:
Exit Function
Fejl:
Resume FejlExit
End Function

Mayby it will do the trick 4 U

Herman
 
ehmmmm Called like this :)

MenuDis("YrMenuName", 2, 5, True) - to enable
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top