Add Field To An Export Query

access2010

Registered User.
Local time
Today, 06:50
Joined
Dec 26, 2009
Messages
1,115
We have a Query that is used to create a Cvs file and we have been trying to add an extra field to be exported without success.

The field is = Price_Previous

Your assistance will be appreciated.

Nicole
 

Attachments

Field is in the query. So what is the issue?
 
Field is in the query. So what is the issue?
Thank you June7 for your reply.

Our problem is that we have tried many times without success and have been unable to update our query to work.

Would you be so kind as to advise us where the = Price_Previous = field should be entered?

Thank you.
Crystal
 
The answer in case anyone cares, is that the code was not using the querydef it was using embedded SQL. The OP had modified the querydef but had not modified the embedded SQL in the VBA code, nor the export code.

The procedure could have simply used the TransferText instead of VBA. I modified the querydef to add the field and do the formatting fixes.

I also added Option Explicit. You should change this setting in the Access option to Declare all variables. You will have to add the line to any code module created prior to you changing the setting (Open VBA editor, Tools/Options/Editor). AND you will need to fix any compile errors that exist because your variables were not defined.
 

Attachments

The answer in case anyone cares, is that the code was not using the querydef it was using embedded SQL. The OP had modified the querydef but had not modified the embedded SQL in the VBA code, nor the export code.

The procedure could have simply used the TransferText instead of VBA. I modified the querydef to add the field and do the formatting fixes.

I also added Option Explicit. You should change this setting in the Access option to Declare all variables. You will have to add the line to any code module created prior to you changing the setting (Open VBA editor, Tools/Options/Editor). AND you will need to fix any compile errors that exist because your variables were not defined.
Thank you Pat for your suggestion.

Nicole
 

Users who are viewing this thread

Back
Top Bottom