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

Code to Restore Full Menus and Database Window 2

Status
Not open for further replies.

bddewell408

Technical User
Jul 25, 2003
56
US
I have seen a website (unknown this one or another) just 3 days ago where the poster had a simple 2 line code that disabled the shift key on startup (I have already done that through code) and then had code to view database window (got that one also), but I cannot find this same website to restore full working menus and the shortcut menus from the right mouse click.

I don't ever want to restore the SHIFT key at startup. I have created a simply Admin Form, where all buttons are invisible on load, and the form's control source is a table I have named tblProgrammersPassword. There is only one field, strProgrammersPassword. This field is hidden. I have an unbound text box, called EnterPassword. I also have another text box, hidden, that runs a macro and if the two fields =, then it returns "true", if not "False". If the field is returned "True", then it unhides two command buttons:
VIEW DATABASE WINDOW - this one works
VIEW TOOLBARS - this one does not

the problems is, I even created my own tool bar and got code that made that one appear, but most of the functions do not work as they are turned off through the startup, I need to be able to get back to do modifications with all tools available to me without the SHIFT KEY.

Thanks
 

The properties you are looking :

AllowFullMenus
AllowShortcutMenus
AllowBuiltInToolbars
AllowToolbarChanges
AllowSpecialKeys
 
Can someone give me code to make the StartupWindow Appear when a command button is pressed, that is what I need
 
I meant to say Code that will make the STARTUP options window appear. I saw it and played with it on Friday, and cannot find it again

If I remember, it was only two lines, I copied that code, put it into a command button, and voila, it came up, or if it was a macro, I cannot remember
 
Code:
make the STARTUP options window appear
DoCmd.RunCommand acCmdStartupProperties

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
THANK YOU!!!!!!!!!!!!!!!

This is not the best way of doing it, but it works.

I have a db password protected with one table and one field, that field has a drop down list, "Operational, Under
Construction" All other databases are linked to this one. When I change the field to UNDER CONSTRUCTION, it won't let anyone else log on to the other databases and anyone currently in the databases will receive a popup form, they cannot close, which will exit them in 5 minutes. These timer macros are on a log in screen I built which hides, doesn't close. So on this log in screen, I also put an admin button which will not make visible all command buttons, unless a correct password is entered. The coommand button will now show the startup properties window so I can change the menus and toolbars and F11 status, so I can exit come back in, immediately hit f11, then change it back so f11 doesn't work, and I can modify and program all day long, and now people cannot use shift or f11
 
bddewell408

In a split mdb application you can leave every1 doing whatever he wants and you playing around with everything. Along with faq705-2010 you could be pretty much Ok. You could restrict the usage of Shift key on startup and the F11.

I would very much like to know what your users feel when you shut them off in the middle of their work! These might help faq181-2145 & faq181-1432
 
Response to last post.

They are not upset I kick them out, We are approximately 20 years behind the times, and are getting automated now. Some of the databases in less than 3 years use have saved 125 (8)hr working days, they understand being kicked off.

It was a necessity to do it this way because some people were leaving the databases open all night and on weekends and locking me out.

I definitely plan to incorporate code from the FAQ about logging out idle users.

We are on a big network, covering an entire county, up to 25 miles away, so I don't want to have to travel all over looking for who is on at any one time. I also plan on incorporating a screen that tells me who is on by their logon.


I really appreciate the info in that last post, hopefully I can incorporate some of that as time permits. Everyone on this list is very helpful, thanks.
 
> I also plan on incorporating a screen that tells me who is on by their logon.

The following is a bonus for you, reminding me 7 years ago where collection department used host's print outs and each collector's phone book (on paper)!

Code:
Sub GuessWho()
    Dim Cnn_Live As ADODB.Connection
    Dim rs As ADODB.Recordset
    Dim S As String
    Set Cnn_Live = New ADODB.Connection
    With Cnn_Live
        .Provider = "Microsoft.Jet.OLEDB.4.0"
        .Properties("Data Source") = App_Folder & App_Dbase
        .Properties("Jet OLEDB:System database") = App_Folder & Sys_Dbase
        .Properties("User ID") = PowerUser
        .Properties("Password") = PowerPassword
        .Properties("Persist Security Info") = False
        .Properties("Mode") = adModeShareDenyNone
        .Properties("Jet OLEDB:Engine Type") = 5
        .Properties("Locale Identifier") = 1033
        .Open
        Set rs = Cnn_Live.OpenSchema(adSchemaProviderSpecific, , "{947bb102-5d43-11d1-bdbf-00c04fb92675}")
        Do Until rs.EOF
            If Left(Trim(rs.Fields(1)), Len(Trim(rs.Fields(1))) - 1) <> .Properties("User ID") Then S = S & "Computer Name: " & Left(Trim(rs.Fields(0)), Len(Trim(rs.Fields(0))) - 1) & "     User: " & Left(Trim(rs.Fields(1)), Len(Trim(rs.Fields(1))) - 1) & Chr(10)
            rs.MoveNext
        Loop
        If Len(S) = 0 Then S = "No one."
        MsgBox S, vbOKOnly, "Connected Users in " & CurrentProject.Name
        .Close
    End With
    Set rs = Nothing
    Cnn_Live.Close
    Set Cnn_Live = Nothing

End Sub

Give them a big welcome to the 20th century [wink] from my behalf!

Enjoy programming
 
Thank you very much!!!!!!!!!!!!!!!!!!!!!!!


I work for government, more specifically, local law enforcement, and I am actually just a regular officer, who has a knack for picking up database design, especially with the help from people on this list.

You know what they say, law enforcement is always 2 steps behind. We recently just got Access XP, (still 2 versions behind)

Thanks
 

I was more than happy with my Access2k even when Access2k3 was around. Now I fear if IT plans installation of A2k7! So for the versions: keep it safe, for people : keep them safe!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top