Results 1 to 7 of 7

Thread: start (2k)

  1. #1
    2 Star Lounger
    Join Date
    Nov 2002
    Posts
    160
    Thanks
    0
    Thanked 0 Times in 0 Posts

    start (2k)

    How i can start my mdb without macro or put the form name at start up
    Ashraf

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: start (2k)

    >>How i can start my mdb without macro or put the form name at start up <<


    I'm sorry, but I don't understand your question. Are you asking how to bypass a startup macro or form? Or are you asking how to start your mdb so it immediately executes a macro or form?
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    2 Star Lounger
    Join Date
    Nov 2002
    Posts
    160
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: start (2k)

    Thanks Dear
    I want to prevent the ueser which form is started the mdb .
    ashraf

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: start (2k)

    Hello Ashraf,

    Please try to be clear - "prevent the user which form is started the mdb" doesn't mean anything. Do you want

    (1) to specify which form is opened when the database is opened, or

    (2) to prevent a specific user from opening a specific form, or

    (3) to bypass the startup options, or

    (4) to prevent the users from bypassing the startup options, or

    (5) something else - if so, what?

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: start (2k)

    Are you asking how to open the database without triggering and AutoExec macro or loading a startup form? If so, and if you have not disabled the bypass key in code, you can hold down the Shift key when you open the database and that will bypass the startup routines.
    Charlotte

  6. #6
    2 Star Lounger
    Join Date
    Nov 2002
    Posts
    160
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: start (2k)

    First : sorry for all couse iam egyption so my english is bad i know that .
    Second : i try to explan more
    if i put at startup the form name for exmble ( mainmenu ) the mdb or mde wil be stated with mainmenu or if i do it with macro autoexec . but if i disabled the bypass shift key i can prevent the user from how he know the name mainmenu but i have user can return bypass shift again so he can know to see the macro or also in startup he can see the form name mainmenu.
    so i want my mdb or mde start without put mainmenu form in startup or macro .
    I hope to be clear
    Ashraf

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: start (2k)

    1. The Access VBA help has an example of code to disable the Shift key as bypass key:

    Sub SetBypassProperty(Flag As Boolean)
    Const DB_Boolean As Long = 1
    ChangeProperty "AllowBypassKey", DB_Boolean, Flag
    End Sub

    Function ChangeProperty(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer
    Dim dbs As Object, prp As Variant
    Const conPropNotFoundError = 3270

    Set dbs = CurrentDb
    On Error GoTo Change_Err
    dbs.Properties(strPropName) = varPropValue
    ChangeProperty = True

    Change_Bye:
    Exit Function

    Change_Err:
    If Err = conPropNotFoundError Then ' Property not found.
    Set prp = dbs.CreateProperty(strPropName, _
    varPropType, varPropValue)
    dbs.Properties.Append prp
    Resume Next
    Else
    ' Unknown error.
    ChangeProperty = False
    Resume Change_Bye
    End If
    End Function

    Use SetBypassProperty False to disable Shift as bypass key, and SetBypassProperty True to enable Shift as bypass key.

    2. In the Tools | Startup... dialog, you can specify whether the user sees the full built-in menus. If you clear the "Allow full menus" check box, items like Tools | Startup... will be hidden.

    WARNING: you should create some kind of backdoor option. If you disable Shift, disallow full menus etcetera, you as developer will be handicapped.

    An alternative to all this is to apply user-level security. Moderator <!profile=WendellB>WendellB<!/profile> has a tutorial on security on his website (see the link in his profile; look for Support > Tutorials)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •