S
stewartie
Hi,
I'm new to the group and would appreciate some help with a macro problem.
I have a database with a macro that runs a number (40+) of select queries.
It uses the following format:
Function RunQueries()
On Error GoTo RunQueries_Err
DoCmd.OpenQuery "QueryName", acViewNormal, acReadOnly
DoCmd.Close acQuery, "QueryName"
DoCmd.OpenQuery "QueryName_1", acViewNormal, acReadOnly
DoCmd.Close acQuery, "QueryName_1"
RunQueries_Exit:
Exit Function
RunQueries_Err:
MsgBox Error$
Resume RunQueries_Exit
End Function
I wish to copy the macro to run the same queries with one criteria changed, e.
g.
DoCmd.OpenQuery "QueryName", acViewNormal, acReadOnly
DoCmd.Close acQuery, "QueryName"
FOR/WHERE VARIABLE_1 = 2
Unfortunately I don't have the script-writing skills and I would be grateful
if anyone could assist.
Thanks in advance.
stewartie
I'm new to the group and would appreciate some help with a macro problem.
I have a database with a macro that runs a number (40+) of select queries.
It uses the following format:
Function RunQueries()
On Error GoTo RunQueries_Err
DoCmd.OpenQuery "QueryName", acViewNormal, acReadOnly
DoCmd.Close acQuery, "QueryName"
DoCmd.OpenQuery "QueryName_1", acViewNormal, acReadOnly
DoCmd.Close acQuery, "QueryName_1"
RunQueries_Exit:
Exit Function
RunQueries_Err:
MsgBox Error$
Resume RunQueries_Exit
End Function
I wish to copy the macro to run the same queries with one criteria changed, e.
g.
DoCmd.OpenQuery "QueryName", acViewNormal, acReadOnly
DoCmd.Close acQuery, "QueryName"
FOR/WHERE VARIABLE_1 = 2
Unfortunately I don't have the script-writing skills and I would be grateful
if anyone could assist.
Thanks in advance.
stewartie