By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,607 Members | 1,970 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,607 IT Pros & Developers. It's quick & easy.

Toolbarnames, localization problem

P: n/a
Hi all

I am using Dutch versions of MSAccess and I use code like:
DoCmd.ShowToolbar "Menubalk", acToolbarNo
DoCmd.ShowToolbar "Formulierweergave", acToolbarNo
Last week when a sysadmin loaded the app on his laptop, the application errored on these lines.
==He was using an English/American version of Access.

Adapting the code to the following works (also in my Dutch version):
DoCmd.ShowToolbar "Menu bar", acToolbarNo
DoCmd.ShowToolbar "Form view", acToolbarNo

I know that to avoid this problem it is best to *not* use a localized version but...
Is there a way to use constants instead of the 'localised' name ? If so, how to find the constants ??
Another way to avoid this problem ??

Arno R
Feb 23 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Arno R" <ar****************@planet.nlwrote in
news:47***********************@text.nova.planet.nl :
Hi all

I am using Dutch versions of MSAccess and I use code like:
DoCmd.ShowToolbar "Menubalk", acToolbarNo
DoCmd.ShowToolbar "Formulierweergave", acToolbarNo
Last week when a sysadmin loaded the app on his laptop, the
application errored on these lines. ==He was using an
English/American version of Access.

Adapting the code to the following works (also in my Dutch version):
DoCmd.ShowToolbar "Menu bar", acToolbarNo
DoCmd.ShowToolbar "Form view", acToolbarNo

I know that to avoid this problem it is best to *not* use a localized
version but... Is there a way to use constants instead of the
'localised' name ? If so, how to find the constants ?? Another way to
avoid this problem ??

Arno R
In Access 2007

Debug.Print Application.Menubar
gives me the name of the default application menubar for that appplication.

Dim z As Long
For z = 1 To CommandBars.Count
Debug.Print z, CommandBars(z).Name
Next z
gives me the ordinal and name of [some or all?] of the various toolbars and
menubars in the application.

Having noted that item 19 is "Menu Bar" and that item 18 is "ESOII" (or
vice versa) I can toggle their visibility by pointing to their ordinal as:
With CommandBars
.Item(19).Visible = .Item(18).Visible
.Item(18).Visible = Not .Item(19).Visible
End With

I have a reference set to Office 12 but I !!!!!think or maybe guess!!!!!
that that is not necessary but helps with code by providing intellisense.

Feb 23 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.