Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Mar 2006
    Posts
    195
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Not a valid passowrd (Access 2000)

    On clicking the db created with the function below i get the message Not a valid password.What may be the reason for that ?

    Function ANewDB(ByVal tName As String)
    '// adds the current date to the name of the database
    Dim strPassword As String
    strPassword = "pint"
    Dim wsp As Workspace
    Dim db2 As Database
    Set wsp = DBEngine.Workspaces(0)
    If Right(tName, 4) = ".mdb" Then
    ' Remove .mdb from the name
    tName = Left(tName, Len(tName) - 4)
    End If
    ' Add date and extension
    tName = tName & Format(Date, "dd-mm-yyyy") & ".mdb"
    ' Create database
    Set db2 = wsp.CreateDatabase(tName, dbLangGeneral & ";pwd=" & strPassword)
    db2.Close
    End Function

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

    Re: Not a valid passowrd (Access 2000)

    It works correctly if I try it. Are you sure your CapsLock key is off when you open the database?

  3. #3
    2 Star Lounger
    Join Date
    Mar 2006
    Posts
    195
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Not a valid passowrd (Access 2000)

    Thank you Hans! You are right . I restarted and it is ok now

Posting Permissions

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