Mayra
in Search
Welcome to Advenet Sign in | Join | Help

Mayra0

Call VP procedure from another Access database

I need to call a procedure from a database (DB1) to import data to another database (DB2). I already have the simple code that imports an Excel file into into the dabase where the procedure is called from; but I need the data to be imported into the other database (DB2). Is there a way that I can indicate to delete and import the table in the other database? I am using MS Access 2002-20003 format. Please help! Any ideas are greatly appreciated.

Public Function Import_CustomerParent()
IF Not IsNull(DLookup("ID", MSysObjects", _
   "Type = 1 AND Name = 'Temp_CustomerParent'")) Then
     DoCmd.DeleteObject acTable, "Temp_CustomerParent"
End If
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel8, "Temp_CustomerParent", "C:\Customers.xls", True

Kind regards,
Mayra 

 

Published Tuesday, April 01, 2008 10:16 AM by Mayra0

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

Name  

Comments 
Type the characters you see in the picture on the left.
    



Note: HTML tags in comment messages are not supported.

This Blog

Tags

No tags have been created or used yet.

Archives