MartyConnelly
martyconnelly at shaw.ca
Fri Oct 10 14:34:07 CDT 2003
You could try TSI SOON
http://www.trigeminal.com/lang/1033/utility.asp?ItemID=8#8
Greggs wrote:
>I have a database that opens a second database using sendkeys (ugly huh?).
>I need to switch to DAO so I can open a password protected database. I have
>used the code from the knowledge base
>http://support.microsoft.com/default.aspx?scid=kb;en-us;161016&Product=acc97
>but I can't get it to close the first database and open a form in the
>second.
>
>here's the code from the Knowledge base...
>
>Sub OpenDB()
> Dim db As Database
> Dim ws As WorkSpace
> Dim rst As Recordset
> Set ws = DBEngine.WorkSpaces(0)
> Set db = ws.OpenDatabase _
> ("C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb", _
> False, False, "MS Access;PWD=northwind")
> Set rst = db.OpenRecordset("Customers", dbOpenDynaset)
> If rst.RecordCount > 0 Then
> rst.MoveLast
> MsgBox rst!CustomerID
> End If
> rst.Close
> db.Close
> End Sub
>
>Do I have to open an application first?
>
>
>_______________________________________________
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com
>
>
>
--
Marty Connelly
Victoria, B.C.
Canada