Standard Access Menu bar

A

Alex Martinez

Hello,

I am developing a small database using Access 2000 for non MS Access users.
My problem is when the user open the database via a icon on the desktop I
don't want the user have any access at all of Access menu bar (File, Edit,
View, Insert, etc.) All I want them to do is to open the file and my form
will appear. How does one code this. I also want the user have access to
the menu bar when they are accessing another MS Access file other then my
own . Any suggestion, tips, examples, or advice will be appreciated. Thank
you.
 
M

Michael J. Strickland

Try making an Autoexec macro with:

Minimize
OpenForm (your form)

Then make a Form level variable in your form:

Public mcolEnabledItems As New Collection

Then put the following code in your Form_Load event:

Dim cbar As Object

For Each cbar In CommandBars

If cbar.Enabled = True Then
mcolEnabledItems.Add cbar.NAME
cbar.Enabled = False
End If

Next cbar


and put the following code in your Form_Unload event:

Dim strCbar As Variant

For Each strCbar In mcolEnabledItems
CommandBars(strCbar).Enabled = True
Next strCbar

End Sub
 
J

Joan Wild

Alex Martinez said:
Hello,

I am developing a small database using Access 2000 for non MS Access
users. My problem is when the user open the database via a icon on the
desktop I don't want the user have any access at all of Access menu bar
(File, Edit, View, Insert, etc.) All I want them to do is to open the
file and my form will appear. How does one code this. I also want the
user have access to the menu bar when they are accessing another MS Access
file other then my own . Any suggestion, tips, examples, or advice will be
appreciated. Thank you.


See
http://www.mvps.org/access/api/api0019.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top