DataMaat
asked on
place BuiltIn control on commandbar with VB
Hello experts,
In Access 2000 when I do customize a commandbar thrue the menu I can click on the 'commands' tab next I can place a form on my commandbar by drag and drop.
When I check in VB the type and Id and parameter I get the following results:
Type = 1, Id=1837, Parameter="myFormName"
Then I try the following code:
commandbars("Mybar").contr ols.Add type:=1, id:=1837, parameter:="myFormName"
I get a runtime error: automation error
When I place a not builtIn-control then it works OK, but as soon I use id:= it does'nt work.
What I'am doing wrong
greetings DataMaat
In Access 2000 when I do customize a commandbar thrue the menu I can click on the 'commands' tab next I can place a form on my commandbar by drag and drop.
When I check in VB the type and Id and parameter I get the following results:
Type = 1, Id=1837, Parameter="myFormName"
Then I try the following code:
commandbars("Mybar").contr
I get a runtime error: automation error
When I place a not builtIn-control then it works OK, but as soon I use id:= it does'nt work.
What I'am doing wrong
greetings DataMaat
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I've rewrite my code and it works fine for me.
But it is still strange you can't use the buitlin id's when you want add a builtin control
greetings from Holland.
DataMaat