Sporadic Recordset items

SiddersAtCHEP

Board Regular
Joined
Nov 2, 2005
Messages
104
I am attempting to copy data from one large spreadsheet to another using a select statement and then using a recordset. I am writing the fields to the target file one by one per record using

rs.fields.item(LoopCount)

to isolate each item of data but I have found that some items are coming through as null e.g. item(1) comes through ok as does item(3) but item(2) doesn't.

I have put different data types in the source cell for item(2) in case it is not interpreting dates correctly, but it continues to show item(2) as null.

Any ideas why this might be happening?
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

Forum statistics

Threads
1,141,681
Messages
5,707,798
Members
421,529
Latest member
Balintn

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
Top