Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 6th, 2007, 09:56 AM
Authorized User
 
Join Date: Feb 2007
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default Import Excel file to back end database

Is there code to import an excel file to the back end database?

I have QC.mdb and QC_be.mdb. I want to have the user click a button on the front end QC.mdb switchboard and import the excel data into a QC_be.mdb table. (I'm trying to keep the user out of the back end database.)

Can I modify the following line to do this?

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, _
    "tblImportData", "C:\Q_C\Sample_Data.xls"

 
Old June 7th, 2007, 11:56 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

I use ADO and pass the spreadsheet in a record at a time (with a persistent connection and recordset) and this allows me to send the data anywhere I want. I am not sure if the IMPORT is going to work when you are not importing it to the file running the code.

Alternatively, you can connect the back end table to the front end and import it that way. I think that will work.

Or import it to the front end, and then pass it to the back end using ADO. Many options. But not yours.

Did any of that help?


mmcdonal





Similar Threads
Thread Thread Starter Forum Replies Last Post
what is the right back end database for PHP? charliemears PHP Databases 1 May 21st, 2008 03:44 PM
Oracle back-end MS-Access 2003 client front-end Corey Access 2 February 16th, 2007 08:31 AM
Import Excel File to access database Komila ASP.NET 1.0 and 1.1 Professional 7 October 7th, 2006 12:45 AM
forum have back-end database? abdul_wasie SQL Server 2000 1 May 9th, 2005 09:11 AM
Queries on Back End database? gazolba Access 3 May 1st, 2004 11:30 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.