A
AlexT
Folks
I have an UNION query that "joins" to "sub-queries", each of them
having a parameter.
I'd like to set a value for the parameter thorough VBA. Should I set
it at the "top" query level of for each "sub-query" ?
To be honest I tried both an nothing work, ie.
Set db = CurrentDb
Set qdf = db.QueryDefs("myQuery")
qdf.Parameters("refDate").value = myValue
debug.print qdf.Parameters("refDate").value ' This is ok
then
DoCmd.OpenForm "myForm"
where myForm.RecordSource is myQuery, the union query, doesn't seem to
work as Access prompts me to enter a value for refDate...
Regards
--alexT
I have an UNION query that "joins" to "sub-queries", each of them
having a parameter.
I'd like to set a value for the parameter thorough VBA. Should I set
it at the "top" query level of for each "sub-query" ?
To be honest I tried both an nothing work, ie.
Set db = CurrentDb
Set qdf = db.QueryDefs("myQuery")
qdf.Parameters("refDate").value = myValue
debug.print qdf.Parameters("refDate").value ' This is ok
then
DoCmd.OpenForm "myForm"
where myForm.RecordSource is myQuery, the union query, doesn't seem to
work as Access prompts me to enter a value for refDate...
Regards
--alexT