Populating Subforms

greenguy

Registered User.
Local time
Today, 14:46
Joined
Oct 30, 2007
Messages
36
I'm sure this is a simple/stupid question but how can I copy a list in Excel then have the user push a button on a form and populate a subform with that list? I tried using DoCmd.RunCommand acCmdPaste but I keep getting an alarm saying "The command or action 'Paste' isn't available now. Any help would be great!
 
You'll need to import the worksheet, you will not be able to do a cut and paste, as far as I'm aware.
 
The code you will need will look something like;

Code:
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel8, "TBL_YourTableName", "c:/YourExcelFile.xls", False

For more information, on what it all means, see this link
 

Users who are viewing this thread

Back
Top Bottom