This one is a mystery and I am delerious from trying to solve it. HELP!
The following SQL and code (I aplogize for it's length, but I am desperate for an answer) in Access 97 to create a temporary query, "tmp", that will be used in a transferspreadsheet command (I have left out just a few irrelevant lines of the subroutine):
I then use:
On all of our Win 2000/Office 2000/Access 97 machines, this works fine. But on one manager's laptop, she get's "Error 3190 Too many fields defined" when the above code is executed. BTW, the query gets created with no problem. The error occurs when the transferspreadsheet command is executed.
I know of this error as it relates to a static table and Access not releasing, say, deleted fields. But this is a query, dynamically produced, and there are far less than 255 fields in it.
Anyone know why this error could be occuring on just one machine? I have upped the memory on that one machine (virtual included) so that it matches, say, my Win 2K machine. Still, she gets the error.
Please.....HELP!
Thanks,
JBG
The following SQL and code (I aplogize for it's length, but I am desperate for an answer) in Access 97 to create a temporary query, "tmp", that will be used in a transferspreadsheet command (I have left out just a few irrelevant lines of the subroutine):
Code:
......
strSql = " SELECT
tblChargeoff.recdate,tblChargeoff.rperson,tblChargeoff.NotRe
coverableReason,tblChargeoff.AUother," & _
"
tblChargeoff.Fdate,tblChargeoff.etime,tblChargeoff.Amanager,
tblChargeoff.Platform,tblChargeoff.EntryDate, " & _
"
tblChargeoff.PrepCompBy,tblChargeoff.Orig,tblChargeoff.Cause
Reason,tblChargeOff.qcDate,tblChargeOff.qc," & _
" tblChargeoff.area,tblChargeOff.TID, tblChargeOff.oSight,
tblChargeOff.cDescription, " & _
" tblChargeOff.eDescription, tblChargeOff.Recoverable,
tblChargeOff.Controller, " & _
" tblChargeOff.eType, tblChargeOff.eAmount,
tblChargeOff.SCenter, tblChargeOff.AU, " & _
" tblChargeOff.Cause, tblChargeOff.eDate," &
varFormattedDate & " AS nDate, " & _
" tblChargeOff.PlanNumber, tblPlanNames.PlanName,
tblChargeOff.rAmt, " & _
" CCur(IIf([etype]=""gain"",[eamount],0)) AS Gain, " & _
" CCur(IIf([etype]=""loss"",-[eamount],0)) AS Loss, "
strSql = strSql & varTotalValue & _
" AS Net," & VBA.Format(Date, "yyyy") & " as NowDate FROM
tblChargeOff LEFT OUTER JOIN tblPlanNames ON
tblChargeOff.PlanNumber = tblPlanNames.PlanNumber "
.......
Set db = CurrentDb
For Each qd In db.QueryDefs
If qd.Name = "tmp" Then
DoCmd.DeleteObject acQuery, "tmp"
End If
Next
Set qd = db.CreateQueryDef("tmp", strSql)
qd.Close
Set qd = Nothing
db.Close
I then use:
Code:
DoCmd.TransferSpreadsheet acExport,
acSpreadsheetTypeExcel97, "tmp", _
"H:\tmp2.xls", -1
On all of our Win 2000/Office 2000/Access 97 machines, this works fine. But on one manager's laptop, she get's "Error 3190 Too many fields defined" when the above code is executed. BTW, the query gets created with no problem. The error occurs when the transferspreadsheet command is executed.
I know of this error as it relates to a static table and Access not releasing, say, deleted fields. But this is a query, dynamically produced, and there are far less than 255 fields in it.
Anyone know why this error could be occuring on just one machine? I have upped the memory on that one machine (virtual included) so that it matches, say, my Win 2K machine. Still, she gets the error.
Please.....HELP!
Thanks,
JBG