J
JString
Here's the general situation:
I have a table that I want to periodically export to an excel spreadsheet.
I don't want all of the table data exported, mind you, but only data that
corresponds to the form that's currently being viewed. The
transferspreadsheet method requires a table or query name, so I wrote some
code that creates a temporary query based on the global filter and the fields
that are contained in the active subform. No problems as of yet...
Now, here's where it gets complicated. There are two subforms that need to
export to excel. Subform A has about 24 fields I think and subform B has
about half of that (around 10 or less I think). What happens is this: I'll
run the export code to generate an SQL statement based on subform A without
any problems. Then I'll run the code for subform B and again, everything
works. The problem arises when I try to run the code for subform A after
running it for subform B, and the SQL error message that I get is "too many
fields defined."
Does anybody know what's going on here?
I have a table that I want to periodically export to an excel spreadsheet.
I don't want all of the table data exported, mind you, but only data that
corresponds to the form that's currently being viewed. The
transferspreadsheet method requires a table or query name, so I wrote some
code that creates a temporary query based on the global filter and the fields
that are contained in the active subform. No problems as of yet...
Now, here's where it gets complicated. There are two subforms that need to
export to excel. Subform A has about 24 fields I think and subform B has
about half of that (around 10 or less I think). What happens is this: I'll
run the export code to generate an SQL statement based on subform A without
any problems. Then I'll run the code for subform B and again, everything
works. The problem arises when I try to run the code for subform A after
running it for subform B, and the SQL error message that I get is "too many
fields defined."
Does anybody know what's going on here?