I think I need to use QueryDef to create a temporary query, but I don't understand how to do it.
I have a table which currently contains 4 fields: ID, Name, RailC, RaidG. Their are about 10000 rows in this table. I have a query that lists them in ascending order by the name, and the query exports only the name, RailC, and RailG to an excel file.
The user is able to add addtional fields. As an example, RailF. I've written code so that RailF is inserted between RailC and RailG.
So my problem is when I need to export to excel, how do I get the additional field within my query.