KeithWilliams
Registered User.
- Local time
- Today, 18:51
- Joined
- Feb 9, 2004
- Messages
- 137
Hi,
I have a window with a command button that calls a function on the window. That works great, but I want to replace the command button with a toolbar button on a custom toolbar.
I don't understand in general how to achieve this. Here's what I have so far:
1. A window named Performance, with VB function DistributeValue()
2. A custom toolbar named ToolbarPerformance, with a single button, with its OnAction set to MacroSwitchboard.DistributeYearToMonths
3. A macro with macro name DistributeYearToMonths, comprising a RunCode action with Function Name = DistributeValue ( )
4. I've assigned "ToolBarPerformance" to the Toolbar property of the form Performance.
When I run and click the toolbar button, I get the error:
"The expression you entered contains invalid syntax. You may have entered a comma without a preceding value or identifier."
I've varied the syntax of the macro's function call, without success.
I'd love to do without macros altogether, but the OnAction field in the toolbar button's properties only offers my existing macro names as choices for the action to perform. I tried just typing Performance.DistributeValue () to reference the VB code directly, but this caused MSAccess.exe to crash.
Please help with this, as the rest of my application is working so sweetly!
Many thanks,
Keith.
I have a window with a command button that calls a function on the window. That works great, but I want to replace the command button with a toolbar button on a custom toolbar.
I don't understand in general how to achieve this. Here's what I have so far:
1. A window named Performance, with VB function DistributeValue()
2. A custom toolbar named ToolbarPerformance, with a single button, with its OnAction set to MacroSwitchboard.DistributeYearToMonths
3. A macro with macro name DistributeYearToMonths, comprising a RunCode action with Function Name = DistributeValue ( )
4. I've assigned "ToolBarPerformance" to the Toolbar property of the form Performance.
When I run and click the toolbar button, I get the error:
"The expression you entered contains invalid syntax. You may have entered a comma without a preceding value or identifier."
I've varied the syntax of the macro's function call, without success.
I'd love to do without macros altogether, but the OnAction field in the toolbar button's properties only offers my existing macro names as choices for the action to perform. I tried just typing Performance.DistributeValue () to reference the VB code directly, but this caused MSAccess.exe to crash.
Please help with this, as the rest of my application is working so sweetly!
Many thanks,
Keith.