Can I auto Change Header Dates in queries

TBC

Registered User.
Local time
Today, 08:32
Joined
Dec 6, 2010
Messages
145

I’m looking for a way to have my queries headers change their dates automatically each month or when the date changes.

I have a query that exports to an excel file. My query changes automatically each month with using the formula below

Code:
 Month12: Min((IIf([CORRESPONDENT_PURCHASE_DATE] Between DateSerial(Year(Date()),Month(Date())-12,1) And DateSerial(Year(Date()),Month(Date())-11,0),[CORRESPONDENT_PURCHASE_DATE])))

Basically when I run the update query and the new month populates the formula above I would like to have the header change.
Does anyone know of a way I can do this, or should I just forget this as an option

Thanks for taking the time to help
TCB
 
When you create a query dynamically, in VBA, you can change the header into whatever you want.

You can change the query once for every result. Not for each record.
First determine what the header should be and then create the new query displaying the new header.

If you want to use queries it can be done but it requires a few creative queries.

HTH:D
 
Thanks Guus2005, can you should me an example?
 

Users who are viewing this thread

Back
Top Bottom