Sending data to Access MDB Table?

  • Thread starter Thread starter WSF
  • Start date Start date
W

WSF

Excel 8.0
I would like to be able to send data from within an Excel function to an
Access log.
e.g.

UserName ' Network Log-in Username - I presume I can use the same code to
obtain this as I use in Access?
Date and Time ' the current Date and Time
ReportType ' a short text string

The Access MDB is named "Reports.mdb" - the Path would be to a network
destination e.g. "\\server1\Reports\Reports.mdb"
The table in Reports.mdb is named "tblLog", with the field names "User",
"DateTime", "ReportType"
The transaction would need to be discreet, in that it can occur in the
background without user intervention - a weekly event that's all.
Is this possible?

Any help gratefully appreciated

WSF
 
This file might be a help:
http://www.bygsoftware.com/examples/zipfiles/log_file.zip
Access Log File - Record Excel data in an Access database using DAO

It's in the "Excel with Access Databases" section on page:
http://www.bygsoftware.com/examples/examples.htm

The code is open and commented.

Also of interest might be help for getting data to and from Excel and
Access: It includes examples of using variables in SQL queries.
http://www.bygsoftware.com/examples/sql.html

Or you can get there from the "Excel with Access Databases" section on page:
http://www.bygsoftware.com/examples/examples.htm

It demonstrates how to use SQL in Excel's VBA to:

* create a database,
* create a table and add data to it,
* select data from a table,
* delete a table,
* delete a database.

DAO and ADO files available.

You can also download the demonstration file called "excelsql.zip".

The code is open and commented.


--
Regards
Andy Wiggins
www.BygSoftware.com
Home of "Save and BackUp",
"The Excel Auditor" and "Byg Tools for VBA"
 
Back
Top