AccessMacros: getting it to add a queried date range to the file n

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

Guest

Hi all,

I've got a 'between' query set up on a "Date of Cancellation" field on a
database i have set up relating to cancelled operations. I set up a
TransferSpreadsheet macro to generate an Excel spreadsheet of the data ok.
However, i'm having trouble with the naming of the file generated by the
macro.

I would like it to be called "C Ops xxx to yyy.xls"

where xxx = the first date range of the between query
and yyy = the second date range of the between query

This is what my file name field currently looks like but i'm obviously
missing something:-

="\\bghnas1\groups\Information Services\SITREPS & Cancelled
Operations\Cancelled Operations Info\Martin Rees Reports\C Ops" &
Format(DLookUp("[Date of Cancellation]","Summary Query"),"ddmmyyyy") & "_.xls"

I think i'm almost there but any assistance would be massively appreciated.

Cheers,

David :-)
 
David,

Where do xxx and yyy come from? Are these dates that the user enters
into unbound textboxes on a form, for use in the query criteria? Or
something else? On the basis of the information you have given so far,
it is difficult to see what you are trying to do.
 
Back
Top