L
laura
Hello,
I've got two queries, one calls another. The first query has a criteria to
select month and year from a date field. The second query calls the first
query.
I want to be able to pass a parameter (a variable) through to the first
query when I call the second query - is this possible?
My first query is called qryEmpEvent and it has a date field where I want to
be able to pass to it a Month and Year. In the Query Design window I put
into the Date field a parameter called "theMonth" (integer) and "theYear"
(integer). If I run the query itself, naturally I get a pop-up box asking me
to put the month and year in which works, but is not what I want.. I want to
be able to pass the variable straight through when I call the second query
query which calls the first and is called qryEmpEventFinal.
My VB Code looks like this... how can I pass the parameter, or variable to
the first query?
stDocName = "qryEmpEventFinal"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Thanks
Laura TD
I've got two queries, one calls another. The first query has a criteria to
select month and year from a date field. The second query calls the first
query.
I want to be able to pass a parameter (a variable) through to the first
query when I call the second query - is this possible?
My first query is called qryEmpEvent and it has a date field where I want to
be able to pass to it a Month and Year. In the Query Design window I put
into the Date field a parameter called "theMonth" (integer) and "theYear"
(integer). If I run the query itself, naturally I get a pop-up box asking me
to put the month and year in which works, but is not what I want.. I want to
be able to pass the variable straight through when I call the second query
query which calls the first and is called qryEmpEventFinal.
My VB Code looks like this... how can I pass the parameter, or variable to
the first query?
stDocName = "qryEmpEventFinal"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Thanks
Laura TD