title: Connecting to a access database via a Account Name and password
body: <p>I'm trying to use two different methods of connecting to a database to edit data, the declaration below is working: </p>
  
  <pre><code>Dim rsConn As ADODB.Connection
  
  rsConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" _
  &amp; Application.StartupPath &amp; "\VFMS_DB.mdb;" _
  &amp; "Jet OLEDB:System Database=Security.mdw", "Ads", "1234")
  </code></pre>
  
  <p>but now I want to do the same thing with the declaration below but I keep getting the message "Not a valid account name or password.</p>
  
  <pre><code>Dim conn As OleDbConnection
  
  conn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" _
  &amp; Application.StartupPath &amp; "\VFMS_DB.mdb;" _
  &amp; "Jet OLEDB:System Database=Security.mdw;Database Account=Ads;Database Password=1234;")
  </code></pre>
  
  <p>I pretty sure it's because of this <code>;Database Account=Ads;Database Password=1234;</code> not being correct. I tried <code>;User ID=Ads;Database Password=1234;</code> and also to make it look like the first statement but neither worked.</p>
  
  <p>If anyone can please assist.
  Thank You</p>