G
Guest
Function Trnsfrdata()
Dim XL As Object
Set XL = CreateObject("Excel.Application")
XL.Workbooks.Open "H:\Feesdownload\FXDH.xls"
DoCmd.TransferSpreadsheet acImport, _ acSpreadsheetTypeExcel7,
"DealsDataNew", _
"H:\FeesDownload\FXDH.xls", HasFieldNames = Yes, "Sheet1!E:O"
End Function
I need help in setting the above procedure to only copy rows with data. The
procedure that runs prior to this one gathers data from a non-Microsoft
database, modifies the data to be compatible with the Access Table and calls
an Access Macro to run this code. (The call to Access is still in the works.)
The problem I run into is that on one occasion there might be a dozen rows
of data and on another a couple hundred rows. I do have some fields with
"required" set to "Yes" so only the rows with data will be pasted, but the
"Unable to Append all the data to the Table" error message pops up and I need
to avoid that.
Is there a way in this instance to have the code limit the copy for pasting
to rows with actual data?
Thanks,
Jim
Dim XL As Object
Set XL = CreateObject("Excel.Application")
XL.Workbooks.Open "H:\Feesdownload\FXDH.xls"
DoCmd.TransferSpreadsheet acImport, _ acSpreadsheetTypeExcel7,
"DealsDataNew", _
"H:\FeesDownload\FXDH.xls", HasFieldNames = Yes, "Sheet1!E:O"
End Function
I need help in setting the above procedure to only copy rows with data. The
procedure that runs prior to this one gathers data from a non-Microsoft
database, modifies the data to be compatible with the Access Table and calls
an Access Macro to run this code. (The call to Access is still in the works.)
The problem I run into is that on one occasion there might be a dozen rows
of data and on another a couple hundred rows. I do have some fields with
"required" set to "Yes" so only the rows with data will be pasted, but the
"Unable to Append all the data to the Table" error message pops up and I need
to avoid that.
Is there a way in this instance to have the code limit the copy for pasting
to rows with actual data?
Thanks,
Jim