I have a very simple question. I have a form with a textbox and a command button. I am trying to connect to an Access Database by clicking the command button and show the contents of one of the fields in table1 of the mdb. So far I have the following code in the "click" event of the command button but it keeps erroring out saying "work.mdb does not exist". (It does!!)
Any help would be greatly appreciated.
Dim connDatabase
Set connDatabase = CreateObject("ADOCE.Connection.3.0")
connDatabase.ConnectionString = " \work.mdb"
connDatabase.Open
connDatabase.Close
Set connDatabase = Nothing
I got this code straight out of the help file, but I don't understand why I don't have to specify the drive and path of the mdb. I put it at the drive root, but that didn't help.
Also, what would the syntax be to display the contents of table1.name in the text box. Thanks in advance.
Here's to alcohol...the cause of ... and solution to ... all of life's problems - - Homer J. Simpson