passing arguments for queries 
Author Message
 passing arguments for queries

Hi all.  I'm new to access, VB, and Excel and am having some problems.
Perhaps someone out there can point me in the right direction.  I am
building an application using access, vb, and excel to store performance
statistics for one of our minicomputers and to do periodic (at this point
daily) performance reporting.

Here's what I've done so far:

I import data into two msaccess database files then I execute a series of
macros in excel which execute some stored queries in access, put he
results in spreadsheets, create and format charts, put it all into a
'daily report' workbook and store it on disk, and end.

In some of the access queries I do things like counts and averages using
the 'totals' method.  

My main problem right now is that all of the records in my database have a
date field which I use in the 'criteria' field of the queries -- date() -
1 to get th e data for the previous day (the day the data were
generated).  This works great except for saturday or if a system goes down
in the night...I need a way to run my report process for a specific date,
preferably without having to re-architect the whole application.  Is there
a way to pass an argument into the criteria field of a stored query using
the transport mechanism between excel and access (I'm STILL not clear what
this mechanism is...DAO, DDE, etc.)?  I'm envisioning storing the previous
days' date in a variable in my first excel macro and when I need to do an
adhoc run simply changing it in this one place.

I hope I've been clear here....I've only been working with this stuff for
a couple of weeks and the documentation doesn't seem to be that


keith hedger
Spoooodly Ahhh Blllooooeeeeyyyyy!!!!

Sun, 04 Jul 1999 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Passing arguments to queries

2. Passing query name as argument in function call

3. Newbie: Passing an argument to a query, and specifying output to a ListBox

4. how to: pass an argument to a query or sp in vb6

5. Arguments : Passing Arguments containing <">

6. Arguments pass short 8.3 filename, how pass LFN?

7. Passing Arguments / Passing an Array

8. Passing Parameters into a Pass-Through Query

9. Passing parameters to SQLServer using a Pass-Through query

10. How to pass argument to MS CreateMail Routine

11. Problem passing arguments

12. Passing Table Name as Function Argument


Powered by phpBB® Forum Software