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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Customised Toolbar - not working on all workstations

Status
Not open for further replies.

jojones

Programmer
Dec 4, 2000
104
AU
I have created a toolbar (not with Code) which is the toolbar for one of my reports. I have written some code which is run by a Macro which is assigned to a couple of the buttons. The buttons/code work on my PC, but not on another colleague's PC, although they DO appear when the report opens. Do I have to assign the macros to the button on each workstation? If so, is there some code which I can run to do this?

thanks
Jo Cheers
Jo Jones
 
First you said the buttons "don't work" on your colleague's PC, then you said they "appear" when the form is opened. I'm assuming that by "don't work" you meant they don't appear when the application starts up.

Normally, when you assign a toolbar name to a report's Toolbar property, you only want the toolbar to be visible when the report is open. That's the default behavior in Access. However, you can force it to be displayed all the time using the View|Toolbars menu, or by right-clicking a toolbar and checking the desired toolbar in the list. It sounds like that's what you've done on your PC.

Setting a toolbar visible when it normally wouldn't be (or making it invisible when it normally would be) overrides Access' default behavior. This custom setting is per user; each user is permitted to turn toolbars permanently on, or permanently off, or to let Access control their visibility. Since it's a per user setting, it doesn't get copied with the database.

You can either have your colleague(s) use View|Toolbars to override Access making it visible all the time, or you can use a ShowToolbar macro action to make it visible in your AutoExec macro. Rick Sprague
 
Rick - thanks for this information. I didn't make myself clear enough.

The toolbar is only required when viewing the report, and that is working as it should on all workstations.
Problem is that the code/macro I have assigned to the toolbar buttons does not appear to be assigned to the buttons when the report/toolbar is opened on a PC other than mine. The toolbar is displayed when the report is opened, but when the buttons are pressed, nothing happens... does this make more sense??

thanks
Jo Cheers
Jo Jones
 
I understand now. Sorry for the confusion.

I have recently been distributing an app with a custom toolbar, and it works fine for my users. Differences are that my toolbar is global, not form or report related, and it calls code directly instead of using macros. But I wouldn't think that would make a difference.

Do you have access to your colleague's PC? If not, can you reproduce the problem on a PC you have access to? You're going to have to isolate the problem by trying out several things in the failing environment, such as verifying that the buttons' Action parameters are correct, and stepping through code if possible. BTW, does the app run in a full copy of Access or in the runtime environment on your colleagues' PCs?

If I had to guess, the strongest possibility that comes to mind is that your code is trapping errors, and hiding them. Some environmental condition on your colleague's PC may be causing a runtime error in your code, and your error handler is simply doing an Exit or Resume Next instead of displaying or recording the error. The easiest way to check this is on a failing PC, turning on Break On All Errors just before you click the toolbar button.
Rick Sprague
 
Hey - I do have a lot of error handling that might be getting in the way of me finding out what's going wrong. I will do some testing and see if I can solve it, or come back with some more info.

thank you so much for your help so far. Jo Cheers
Jo Jones
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top