Every day, I run queries in Access and paste them into Excel. I have been working on a macro to use Microsoft Query to directly import the data using a macro. However, I'm not sure how to introduce a variable condition, for lack of a better way to put it.
Here's an example of what I've been working on:
But rather than "DataDate={ts '2006-11-16 00:00:00'})"" I would like some way to search for records for a specific date. If it matters, I am always look for records from yesterday. If there is a way to introduce a variable, say from a cell in my spreadsheet, that would be great.
One last thing, though I can work around this detail... I would like to search by date, but I'd prefer not to get the dates back in the data (as they'll all be the same anyway). Can you have a field as a condition without making it part of the results from the query ?
Thank you in advance.
Bookmarks