Transfer Spreadsheet - able to limit by data????

unc2plo

Board Regular
Joined
Mar 18, 2002
Messages
148
I have a db that uses transfer spreadhseet to upload some data. Is there a way to limit what data gets brought across? Can I say bring over only items within a certain date range?

This what teh code says now......

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "tblExcelLoad", Me.cdg1.FileName, True

Thanks,
David
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
I would recommend trying to limit before or after the import, not during the import.

There are a number of ways to do it. One way is to import the data into a temporary access table, then create an Append Query that limits the data according to your desired criteria, and then adds those records to your final table.
 
Upvote 0
oooohh, I like that.

I inherited this db, and it is way too reliant on code which makes it tough to rework.

Thanks - your comment really showed me that I need to look at this a different way vs trying to live within the constraints that it places on me.
 
Upvote 0

Forum statistics

Threads
1,214,613
Messages
6,120,515
Members
448,968
Latest member
Ajax40

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top