The following code, designed to connect to an Access Database, and populate a textbox with a value from a field(Name) in Table1. I keep getting the following message: "database '\pda.cdb' does not exist. It does exist. I have placed it in the working directory and also at the root of d: and modified the line to connDatabase.ConnectionString = "data source=d:\pda.cdb"
PLEASE HELP!!!!!!!!!!!
Private Sub Command1_Click()
Dim connDatabase
Set connDatabase = CreateObject("ADOCE.Connection.3.0")
connDatabase.ConnectionString = "data source=\pda.cdb"
connDatabase.open
Dim rs 'Create a variable for the Recordset object reference
Set rs = CreateObject("adoce.recordset.3.0")
rs.open "table1"
Me.Text1.Text rs.Fields("firstfield").Value
rs.Close
Set rs = Nothing
connDatabase.Close
Set connDatabase = Nothing
End Sub
Here's to alcohol...the cause of ... and solution to ... all of life's problems - - Homer J. Simpson