Exporting a query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to export a very simple query using an export spec. I have the
fields exactly the way they should be output. When I start the export and the
wizard comes up the fields are still in the correct order. However, when I
click on the Advanced button to create a spec the fields are rearranged. If I
try to switch the fields for the spec it goves me an error and will not
export all of the fields. How can I get the spec to output my file in the
exact format that I need?
 
Can you give us specific examples of the SQL statement for the query, the
export specification, the field order in the resulting file, how are you
doing the export (manually, by macro, by VBA code)?
 
Using the SQL view the code is as follows:

SELECT EFFECTIVE DATE AS [START DATE], Null AS [END DATE], DEL_TIME AS
[ARRIVAL TIME], dep_time AS [DEPART TIME], ALTSHIPSUPP AS [SUPPLIER CODE],
[Dock Code] AS DOCK, Null AS DOOR
FROM SUPPLIERS INNER JOIN TRUCKLOAD ON SUPPLIERS.SUPPCODE =
TRUCKLOAD.ALTSHIPSUPP
WHERE (((SUPPLIERS.WHERENET)=True))
WITH OWNERACCESS OPTION;

The order of the fields in the text output file need to be:
START DATE, END DATE, ARRIVAL TIME, DEPART TIME, SUPPLIER CODE, DOCK, DOOR

When I manually try to export not using the export spec wizard it comes out
in this order. However, as soon as I click on Advanced to create the export
spec it switches the ARRIVAL TIME and END DATE fields and outputs the file
with them switched as well.

I hope this helps. Thanks!
 
Are you clicking the Advanced button in the export wizard after you've set
all the fields and their types, etc.? Or are you clicking it as as soon as
the wizard window first opens? If not doing the former, go all the way to
the end of the manual export process, and before you click the Export button
on last window, then click Advanced to save the spec. Does that work?
--

Ken Snell
<MS ACCESS MVP>




NChris said:
Using the SQL view the code is as follows:

SELECT EFFECTIVE DATE AS [START DATE], Null AS [END DATE], DEL_TIME AS
[ARRIVAL TIME], dep_time AS [DEPART TIME], ALTSHIPSUPP AS [SUPPLIER CODE],
[Dock Code] AS DOCK, Null AS DOOR
FROM SUPPLIERS INNER JOIN TRUCKLOAD ON SUPPLIERS.SUPPCODE =
TRUCKLOAD.ALTSHIPSUPP
WHERE (((SUPPLIERS.WHERENET)=True))
WITH OWNERACCESS OPTION;

The order of the fields in the text output file need to be:
START DATE, END DATE, ARRIVAL TIME, DEPART TIME, SUPPLIER CODE, DOCK, DOOR

When I manually try to export not using the export spec wizard it comes out
in this order. However, as soon as I click on Advanced to create the export
spec it switches the ARRIVAL TIME and END DATE fields and outputs the file
with them switched as well.

I hope this helps. Thanks!
Ken Snell said:
Can you give us specific examples of the SQL statement for the query, the
export specification, the field order in the resulting file, how are you
doing the export (manually, by macro, by VBA code)?

--

Ken Snell
<MS ACCESS MVP>

and
the rearranged.
If I
 
Back
Top