Hi All,
I would like to export selected columns from an excel sheet to MS Access. All the columns are not together, they are B, C, Z and AA.
I used Transferspreads heet but only ranges without gaps can be achieved in it as per my review
I used SQL query code as below, even that shows an error as "Too few parameters, expected 4". Please help me out to successfully complete this import.
I would like to export selected columns from an excel sheet to MS Access. All the columns are not together, they are B, C, Z and AA.
I used Transferspreads heet but only ranges without gaps can be achieved in it as per my review
I used SQL query code as below, even that shows an error as "Too few parameters, expected 4". Please help me out to successfully complete this import.
Code:
ssql = "INSERT INTO [MS Access;DATABASE=C:\Users\" & usrnm & "\Desktop\Aging_Report.accdb].[COMMERCIAL_DETAIL] ( [SUPERVISOR NAME], [PRODUCT], [AGE], [STATUS] ) SELECT [COMMERCIAL_DETAIL$].[B], [COMMERCIAL_DETAIL$].[C], [COMMERCIAL_DETAIL$].[Z], [COMMERCIAL_DETAIL$].[AA] FROM [COMMERCIAL_DETAIL$]"
Code:
DoCmd.TransferSpreadsheet acImport, 10, "COMMERCIAL_DETAIL", Form_frmRptUpld.RPath.Value, True, "B:C,Z:AA"
Comment