Link to home
Start Free TrialLog in
Avatar of PasqualeMarcantonio
PasqualeMarcantonio

asked on

MS Access

How do I link to data base using VBA Code.
ASKER CERTIFIED SOLUTION
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of PasqualeMarcantonio
PasqualeMarcantonio

ASKER

I plan to open a form, test for data in a table, if the table is not found then link to the data base using VBA Code.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you want to link to a Microsoft Access database from a standalone VB program, you can use ADODB.  The connection string will need to be specific for Access.  I'm looking for a sample and will post it when I find it.
You can also set up an ODBC connection for the MS Access database and use that in your VB for connecting.

There is no need to us ADODB to link to an Access MDB or ACCDB.

mx
<There is no need to us ADODB to link to an Access MDB or ACCDB.>

If you mean to link tables then you're right - DAO is much easier to work with if the goal is to build linked tables from within Access.

If the OP wishes to connect to an Access database from another environment (like VB or ASP) there's nothing wrong with using ADO. In many cases it's preferable to build a connection to the Database using ADO and then work with that connection, depending on what you want to accomplish.
Has this question been resolved?  Can we close the question ?

thx.mx
I've requested that this question be deleted for the following reason:

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
The author asked how to link tables with VBA. Both of these are correct, valid solutions:

http:#a35059939
http:#a35060023

Suggest you split the points between them
All,
 
Following an 'Objection' by LSMConsulting (at https://www.experts-exchange.com/questions/27193677/16-Jul-11-15-Automated-Request-for-Review-Objection-to-Delete-Q-26869004.html) to the intended closure of this question, it has been reviewed by at least one Moderator and is being closed as recommended by the Expert.
 
At this point I am going to re-start the auto-close procedure.
 
Thank you,
 
SouthMod
Community Support Moderator