Hi gang,
Is there anyway I can connect to a table created in the above version of Access? I'm trying to connect via the data control and it says that the database is corrupted or is not an Access database.
Any idea?
Thanks much :D
JazzBass
Printable View
Hi gang,
Is there anyway I can connect to a table created in the above version of Access? I'm trying to connect via the data control and it says that the database is corrupted or is not an Access database.
Any idea?
Thanks much :D
JazzBass
You are probably trying to connect to a version of a database that was released after the ADO. You might have to code your connection the "manual" way. Just a hunch.
Are you sure that the control is pointing to the database??
if so then why not try an SQL statment like
DIM dbs as database, rst as recordset
set dbs = opendatabase("c:\mydb.mdb")
set rst = dbs.openrecordset _
("SELECT column1, column2 " _
"FROM tbltable;" _
or if you wanted to you could also make a condition like
set rst = dbs.openrecordset _
("SELECT column1, column2 " _
"FROM tbltable " _
"WHERE column1 = 'whatever' " _
"OR column2 = '" & a varable & "';")
dbs.close
Thanks for the input,
I figured it would be something that is beyond what I know about databases.
I have another question regarding how to post query results in Office 97 VBA
Here is my code:
After the query runs, I don't get any feedback.Code:Sub cmdUpdate_Click()
Dim dbs As Database, rst As Recordset
Dim strVariable As String
strVariable = Forms!StateSelectNew.cmbStateSelect
strSQL = "SELECT DISTINCT * FROM OTC_SITES WHERE [SITE_STATE] = " & "'" & strVariable & "'"
Set rst = dbs.OpenRecordset(strSQL)
Set dbs = Nothing
End Sub
Any ideas?
Thanks
Jazzbass