View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
mr tom mr tom is offline
external usenet poster
 
Posts: 119
Default Parameter Driven Query

It probably would be better, but I'm still getting to grips with VBA and SQL.
;)

I'm a project manager (not an IT one) rather than a techie, although I do as
much techie stuff as I can as I don't like to be helpless...

Cheers.

"RB Smissaert" wrote:

Better to move away from MS Query and code with ADO where you have
parameterized queries and a lot of other useful options.

RBS

"mr tom" <mr-tom at mr-tom.co.uk.(donotspam) wrote in message
...
Hi,

I'm used to using MS Query to return data to Excel, but there's a whole
stack of queries that I run each month (literally, dozens) where the date
range needs to be changed.

I'm wondering whether I could put the chosen date ranges into an excel
spreadsheet, maybe in the format:

Col 1 Col 2 Col 3 Col 4
sheet query start date end date

...and use VBA to modify the SQL for me.

Alternatively, can the SQL itself be written to request a parameter from a
particular location?

Any ideas? This could be a massive time saver!

Cheers,

Tom.