Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create an Import from Excel button in Switchboard

Status
Not open for further replies.

kinselas

IS-IT--Management
Aug 4, 2002
60
AU
PLEASE HELP !!!
I have attempted to do this 20 times , read the help and followed the prompts but failed .Could someone please help me & describe in detail from scratch.
What I did in module I clicked new & immediately typed
DoCmd......
1. I am using Excel & Access 2000
2. The table to which I want to import is called...OUTLETS
3. The Excel file is in d:\Xtract.xls
Thank you
 
Hi

The syntax is:

DoCmd.TransferSpreadsheet [transfertype][, spreadsheettype], tablename, filename[, hasfieldnames][, range]

So command should look something like:

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel4, "Outlets", "d:\Xtract.xls"

you may need a true/false on the end depending if you spread sheet has column names as the first row.

IF this does not work, it would help if you describe what actually happens, ie error messages obtained etc.

Regards

Ken Reay
 
Hiya,

Open MS Access, in the opening dialogue - create a new blank database with the name that you require, by going to the location and creating it with whatever name.

Click File (on the menu) and Get External Data - then Import, change the 'Type of File' to Excel and find the spreadsheet.

Click Tables, then New, choose the Spreadsheet then Link.

Follow the wizard.

Darrylle







"Never argue with an idiot, he'll bring you down to his level - then beat you with experience."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top