W
Walkabout via AccessMonster.com
I have developed an addition to a data report system that from which the user
may choose multiple reports that have been set up by the user, and as the
multi-selected reports choosen are run, all reports that have the same fields
are appended to a data table the user gets to name.
I added check boxes so the user could also run STD3 Deviation and Medians on
these reports (if they chose to save the results to a table/spreadsheet), on
each record added to the table, from the reports the user chose to run and
have been appended to the data table.
If the user chooses to do this, the needed fields are added to the table that
was created if the user checked the box to save the reports to a
table/spreadsheet. This is done by using the alter table command to add the
fields that are then caculated through functions and populated to each record
by its Report ID (and other fields, for each record):
If DoesFieldExist("RtnsSTD3") <> True Then
db.Execute _
"ALTER TABLE [" & NewTblName & "] ADD COLUMN RtnsSTD3 text(30)", _
dbFailOnError
End If
What goes wrong is the Transfer Spreadsheet command below does not work when
the table is altered and a field is added, but it does work if no fields have
been added.
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, [OldQueryName],
[MyFile]
The Error message I receive is:
The Microsoft Jet Database Engine could not find the Object''. Make sure the
object exists and that you spell it's name and the path name. - But when I do
a watch on OldQueryName and MyFile the both have the correct values in them.
If I have not added the new columns, it copies the table to the Spreadsheet,
no problem. What gives here with the empty quotes?
Thanks in Advance,
Walkabout
may choose multiple reports that have been set up by the user, and as the
multi-selected reports choosen are run, all reports that have the same fields
are appended to a data table the user gets to name.
I added check boxes so the user could also run STD3 Deviation and Medians on
these reports (if they chose to save the results to a table/spreadsheet), on
each record added to the table, from the reports the user chose to run and
have been appended to the data table.
If the user chooses to do this, the needed fields are added to the table that
was created if the user checked the box to save the reports to a
table/spreadsheet. This is done by using the alter table command to add the
fields that are then caculated through functions and populated to each record
by its Report ID (and other fields, for each record):
If DoesFieldExist("RtnsSTD3") <> True Then
db.Execute _
"ALTER TABLE [" & NewTblName & "] ADD COLUMN RtnsSTD3 text(30)", _
dbFailOnError
End If
What goes wrong is the Transfer Spreadsheet command below does not work when
the table is altered and a field is added, but it does work if no fields have
been added.
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, [OldQueryName],
[MyFile]
The Error message I receive is:
The Microsoft Jet Database Engine could not find the Object''. Make sure the
object exists and that you spell it's name and the path name. - But when I do
a watch on OldQueryName and MyFile the both have the correct values in them.
If I have not added the new columns, it copies the table to the Spreadsheet,
no problem. What gives here with the empty quotes?
Thanks in Advance,
Walkabout