R
ragtopcaddy via AccessMonster.com
First of all, how do I look up "#VALUE!" in this group? I enclose it in
quotes and return hundreds of "Value" threads which I then have to work
through in vain to find the #VALUE! threads I'm looking for.
Now, to my specific problem. I have 2 queries which I transfer to an excel
workbook. They both return the same data for different dates. One
transferspreadsheet action returns all the records properly. The other one
returns thousands of #VALUE! cells sporadically throughout the sheet.
wkBk.Close True
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "qryDataOld",
strNewWkBk
Set wkBk = xlObj.Workbooks.Open(strNewWkBk)
With wkBk
.Sheets("qryDataOld").Activate
.ActiveSheet.Name = Format(dtOld, "yymmdd") & " Data"
.Close True
End With
'returns #VALUE! cells
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "qryDataNew",
strNewWkBk
Set wkBk = xlObj.Workbooks.Open(strNewWkBk)
With wkBk
.Sheets("qryDataNew").Activate
.ActiveSheet.Name = Format(dtNew, "yymmdd") & " Data"
.Sheets("QTree and Owner Changes").Activate
.Close True
End With
'returns accurate cells
It's a mystery to me!
quotes and return hundreds of "Value" threads which I then have to work
through in vain to find the #VALUE! threads I'm looking for.
Now, to my specific problem. I have 2 queries which I transfer to an excel
workbook. They both return the same data for different dates. One
transferspreadsheet action returns all the records properly. The other one
returns thousands of #VALUE! cells sporadically throughout the sheet.
wkBk.Close True
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "qryDataOld",
strNewWkBk
Set wkBk = xlObj.Workbooks.Open(strNewWkBk)
With wkBk
.Sheets("qryDataOld").Activate
.ActiveSheet.Name = Format(dtOld, "yymmdd") & " Data"
.Close True
End With
'returns #VALUE! cells
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "qryDataNew",
strNewWkBk
Set wkBk = xlObj.Workbooks.Open(strNewWkBk)
With wkBk
.Sheets("qryDataNew").Activate
.ActiveSheet.Name = Format(dtNew, "yymmdd") & " Data"
.Sheets("QTree and Owner Changes").Activate
.Close True
End With
'returns accurate cells
It's a mystery to me!