i want to link my forms with access tables and dont want to use the odbc object. i need to use the ADO is it posible and how.

for in my first instance it worked, but when i moved it to another computer it signaled "Canot find database"

Help pliz

You can connect your Access Table with your VB form using different method. By using ADO, you can connect like this:

You have to select "Microsoft ActiveX data Object 2.0 or higher" from the preference of your VB.

Then, write this code in the module section:
Public ConnectData As New ADODB.Connection

'For making Connection
Public Sub Connect2DB()
Set ConnectData = New ADODB.Connection
ConnectData.Provider = "Microsoft.Jet.OLEDB.4.0; Data Source = " & App.Path & "\Your AccessDatabase Name.mdb;"
ConnectData.Open

end sub

Whenever you need connection, call this connection by wringting "Call Connect2DB"

Hi,

You need to update your recordset. If it doesn't help then it may possible your database has been corrupted. Try compact and repair utility to repair your database. If you're still not able to repair the mdb file try Stellar Phoenix access recovery tool. This access repair software repair corrupted access database file and mdb files.

When you have already the code but still the connection doesn't work try to check the path of yur connection because as what you have said you have transferred your program in other computer.

This article has been dead for over six months. Start a new discussion instead.