> Below is the code, but basically the code snippet compares a server
> and local version of the database.... Note that the user has neither
[quoted text clipped - 7 lines]
> security). I cannot figure out how to open the databases if they have
> a database password. Any ideas? Thanks! Mike
[...]
> ServerDir = "\\myserver\serverdb"
> LocalDir = "C:\Program Files\localdb"
[quoted text clipped - 13 lines]
> LocalVersion = rst!Version
> rst.Close
Try something like this:
' ...
Dim ServerPW As String
Dim LocalPW As String
ServerPW = "YourPW"
LocalPW = "YourOtherPW"
Set rst = CurrentDb.OpenRecordset( _
"SELECT Version FROM [MS Access;Database=" & _
ServerFile & ";pwd=" & ServerPW & "].tblAdmin",
dbOpenSnapshot)
ServerVersion = rst!Version
rst.Close
Set rst = CurrentDb.OpenRecordset( _
"SELECT Version FROM [MS Access;Database=" & _
LocalFile & ";pwd=" & LocalPW & "].tblAdmin",
dbOpenSnapshot)
LocalVersion = rst!Version
rst.Close

Signature
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
77m.grub@gmail.com - 14 Jun 2007 18:34 GMT
On Jun 14, 12:25 pm, "Dirk Goldgar" <d...@NOdataSPAMgnostics.com>
wrote:
> Innews:1181826819.068230.131700@d30g2000prg.googlegroups.com,
>
[quoted text clipped - 59 lines]
>
> - Show quoted text -
Worked! Thanks!
Mike