Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    3 Star Lounger
    Join Date
    Apr 2003
    Location
    Calgary, Alberta
    Posts
    327
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Security Problems Still (Access 2000)

    I am trying to get a single database to require a loginid and password while every other database will open unrestricted. I know I have asked about this before, but there is some concept that I am missing. I have created my accounts and permission twice now and somehow I have lost them as well (not sure how that happens, but its annoying). When i did have the accounts, I still get asked a username and password for each db that I open. I have checked out Wendells link as well. Do I have to create the account through code? Can someone explain how I can accomplish this?

    Thanks

  2. #2
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Columbus, Ohio, USA
    Posts
    286
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Security Problems Still (Access 2000)

    Sounds like you changed the default security file, system.mdw, when you applied security and did not rename it when you saved it. Access 2K has a nice security wizard that will take care of this for you. Good luck.

  3. #3
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Security Problems Still (Access 2000)

    Bill has you on the right track. There are two ways to set the link to the secure security file (system.mdw). The first is with the Workgroup Administrator ( a shortcut in your Office directory will start it for you), and that sets the default security file used every time you start Access. The second way is by using a shortcut when you start a specific database. One of the command line options is to specify the path to the security file. You can find the details in Access Help - search for command line.
    Wendell

  4. #4
    3 Star Lounger
    Join Date
    Apr 2003
    Location
    Calgary, Alberta
    Posts
    327
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Security Problems Still (Access 2000)

    OK cool, I will use that, in reagrds to security, i have another qick question. I have a module in Excel which inserts datainto teh db. Everytime an instance of the db is created, a username a password is requested. In my connection string, what would the syntax be to input username and password for the module
    Currently I have: StrServerLoc = "C:WINDOWSPOSFilesdbPOS.mde"
    I cannot seem to get the username and apassowrd in there correctly [img]/forums/images/smilies/sad.gif[/img] an example would be awesome

    Thanks

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

    Re: Security Problems Still (Access 2000)

    The code StrServerLoc = "C:WINDOWSPOSFilesdbPOS.mde" only specifies the name of the database. Surely that can't be all! What is the code you use to connect to or open the database?

  6. #6
    3 Star Lounger
    Join Date
    Apr 2003
    Location
    Calgary, Alberta
    Posts
    327
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Security Problems Still (Access 2000)

    Basically this is what I have. There are also times where I open an instance of the db,

    StrServerLoc = "C:WINDOWSPOSFilesdbPOS.mde"
    Sheets("order new").Select

    'Connect to DB
    Set wsp = DBEngine.CreateWorkspace(Name:="MyWsp", UserName:="Admin", Password:="", UseType:=dbUseJet)
    Set dbs = wsp.OpenDatabase(StrServerLoc)

    Dim objAcc3 As New Access.Application
    objAcc3.OpenCurrentDatabase StrServerLoc
    ProductStatus = "'I'"
    DidInsert = objAcc3.Run("InsertNewMixedIntoOrderWithAdjustment ", InvoiceID, ProductID, QtyOrdered, UnitPrice, ProductStatus)
    objAcc3.Quit
    Set objAcc3 = Nothing

    I would like to put the password in the string so I don't have to put it in each time I create an instance of the db

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

    Re: Security Problems Still (Access 2000)

    I don't understand why you are both using DAO to open a database object (Set dbs = ...) and using Automation to start Access and open the same database as current database. Is there a specific reason to do so?

  8. #8
    3 Star Lounger
    Join Date
    Apr 2003
    Location
    Calgary, Alberta
    Posts
    327
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Security Problems Still (Access 2000)

    I did it because for some reason, I could not access my code stores in modules in the Access db. I remeber discussing this isue a while back, but I guess I might have not explained my full situation. So from this mesage, you are telling me that II shold be able to access anything in my access db once I make the connection to it? I was almost certain before I could not access any code put in the modules stored in Access? If there is any way I could make the code more efficent, I am listening [img]/forums/images/smilies/smile.gif[/img] ?

    Thanks

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

    Re: Security Problems Still (Access 2000)

    No, you can't get at the code in an Access database using DAO.

    I would investigate the possibilities of providing a user name and password in CreateWorkspace, and of providing the database password in OpenCurrentDatabase. If you position the insertion point in one of these words and press F1, you'll get online help.

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

    Re: Security Problems Still (Access 2000)

    Can you explain what you're trying to accomplish and what you mean by accessing your "code stores"? You are already passing the user name and password to the database in the CreateWorkspace statement, so what login and password are you talking about?
    Charlotte

  11. #11
    3 Star Lounger
    Join Date
    Apr 2003
    Location
    Calgary, Alberta
    Posts
    327
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Security Problems Still (Access 2000)

    OK thanks

  12. #12
    3 Star Lounger
    Join Date
    Apr 2003
    Location
    Calgary, Alberta
    Posts
    327
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Security Problems Still (Access 2000)

    My modules in Access (sorry). I basically have a form that is filled out in excel(yes excel) and with the press of a macro in Excel, the invoice is inserted into the database. Since I am using DAO to connect to the db and using automation to get at my code in my access modules, I am always getting asked a username and password (since each user had some sort of restricted access). I just need to find out how I can supply a username and password when using automation

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

    Re: Security Problems Still (Access 2000)

    Is there Access security in place on the database? If so, you're already passing a user name and password in the CreateWorkspace statement, as I said. You open the database in that workspace, and the user name and password are passed to the database automatically from the workspace. Your code is passing in the Admin user name and an empty password, which is the default for unsecured database. You have to replace those with a user name and password that will allow you to do what you want. However, if the code is in Excel, then you have put, in the clear, a user name and password that will allow others to get into the database, regardless of their permissions. You might be better advised to create a special login in Access for what you're trying to do and restrict its permissions by taking away create and modify and delete rights.
    Charlotte

  14. #14
    3 Star Lounger
    Join Date
    Apr 2003
    Location
    Calgary, Alberta
    Posts
    327
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Security Problems Still (Access 2000)

    OK Cool, I will try out your recommendation. Thanks

  15. #15
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Security Problems Still (Access 2000)

    Why are you accessing the modules - you should be able to invoke routines without opening the modules or getting any other sort of password prompt. In Access 2000 there is no security associated with modules, although you can create a password to protect modules from being viewed or edited.
    Wendell

Page 1 of 2 12 LastLast

Posting Permissions

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