PC Review


Reply
Thread Tools Rate Thread

choosing an excel file to import into Access

 
 
New Member
Join Date: Jun 2011
Posts: 1
 
      30th Jun 2011
Hi

I found this code that lets the user enter an excel file and then import into access.
End Sub
'Private Sub Command126_Click()
On Error GoTo Err_Command126_Click
Dim strFile As String
strFile = InputBox("What is the name of the file?")
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "MyTableName", _
"f:\" & strFile & ".xlsx", False, "WorksheetName!A1:S200"

End Sub

MyTableName is my access table.

It bombs at "WorksheetName!A1:S200".
The path name to the f drive is to a memory stick.


JAM
 
Reply With Quote
 
 
 
 
New Member
Join Date: Jun 2011
Posts: 1
 
      30th Jun 2011
Hi ,

Please send me the code for updating data's to database when check box is clicked in the datagrid view
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Import Excel File into Access DB where user can specify file name andcell range to import ssa Microsoft Access External Data 1 18th May 2011 01:18 AM
access import wizard doesn't import all rows of excel file Linda in Iowa Microsoft Access External Data 1 24th Aug 2008 04:48 AM
Excel file will not import to Access, what may be the cause =?Utf-8?B?TG93bmVy?= Microsoft Excel Misc 1 15th Jun 2007 09:19 PM
Import a Query into Excel and Open the Excel file via Access hansjhamm@yahoo.com Microsoft Access 2 14th Sep 2006 01:07 PM
Can I import an Excel file into Access? If so, how? =?Utf-8?B?Y2RnMTkwNg==?= Microsoft Access External Data 1 16th May 2006 04:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:29 AM.