10

I would like to use an SQLite database from Microsoft Access (access from- or transfer the contents to Microsoft Access).

  • How can this be done using VBA?

This is for a client who can not install extra software:

  • Does a library exist in VBA to use SQLite databases?
user4157124
  • 2,809
  • 13
  • 27
  • 42
Phong
  • 6,600
  • 4
  • 32
  • 61
  • 3
    The condition with no installation of other software means there is no way to do what you want, unless you can export from SQL Lite in a format that Access/Jet/ACE can import. – David-W-Fenton Mar 26 '10 at 19:06

4 Answers4

7

This question popped up in my recent (2021) search on the same topic, and the answer has changed since 2010.

There are now several ODBC drivers for SQLite. Here are two (I have no affiliation with either):

Free: http://www.ch-werner.de/sqliteodbc/

Paid: https://www.devart.com/odbc/sqlite/download.html

Jason
  • 2,507
  • 20
  • 25
  • Christian Werner's driver has been around for a long time (I wonder if he will ever give it version # 1.0 :) ), but these links should very much be on this Q&A. – Andre Jan 03 '21 at 20:28
3

Does a standard library exist in VBA to used sqlite database?

No. Access and VBA do not have any native capability to connect to SQLite data sources.

You would have to install additional software to allow Access to use SQLite.

HansUp
  • 95,961
  • 11
  • 77
  • 135
2

If you can use the sqlite3.exe command line tool, then have VBA spawn that and dump the data to a csv file. Then Access can read both local data and the CSV file and copy appropriately.

Samuel Neff
  • 73,278
  • 17
  • 138
  • 182
1

There are a number of solutions available which a simple Google search would reveal. Here is one: http://www.freevbcode.com/ShowCode.asp?ID=6893

Craig T
  • 2,761
  • 5
  • 25
  • 33
  • 2
    Thank you, But this "Application" is for a client and I can not make him install "extra software" than the one already installed (in this case MS-Access) – Phong Mar 25 '10 at 07:21