Afternoon all,
my Database is nearlly all finished just one thing needs doing.
I have a query that I run in VB, then it exports it into a CSV file to a folder on the C drive.
When you run the code it goes to the query where it asks for the date and the CSV file is based on that.
What I need it to do is save it as Cancellation "Cancel_date"
The query name is "Cancellations"
currently I have
strFile1 = "C:\Cancellations\Cancellations" & Format(Date - 1, "yyyymmdd") & ".csv"
This works fine and save it as Cancellation 20090419.CSV
I have tried
canceldate = "Cancellations.Cancel_date" - Cancellations being the query and Cance_date the field
strFile1 = "C:\cancellations\cancellations " & canceldate & ".csv"
This doesn't work. Any ideas?
Thanks
my Database is nearlly all finished just one thing needs doing.
I have a query that I run in VB, then it exports it into a CSV file to a folder on the C drive.
When you run the code it goes to the query where it asks for the date and the CSV file is based on that.
What I need it to do is save it as Cancellation "Cancel_date"
The query name is "Cancellations"
currently I have
strFile1 = "C:\Cancellations\Cancellations" & Format(Date - 1, "yyyymmdd") & ".csv"
This works fine and save it as Cancellation 20090419.CSV
I have tried
canceldate = "Cancellations.Cancel_date" - Cancellations being the query and Cance_date the field
strFile1 = "C:\cancellations\cancellations " & canceldate & ".csv"
This doesn't work. Any ideas?
Thanks
Last edited: