G
Guest
In Access 2003, is it possible to call a Sub from a macro? I know you can
call a Function, but I am not passing any information. In my macro, I run 4
queries. Query 1 clears a table that will receive the final data.Qquery 2
updates a date field for all records in a second table. Query 3 inserts all
records from table 2 into final table. Query 4 selects records from a 3rd
table meeting a date matched on current month and inserts them into the final
table. As part of this macro, I would like to be able to call a Sub to
process through all records in the final table against a table containing
company holidays. I need to check the records in the final table to make sure
the date is not a company holiday or a Saturday or Sunday. I have the 4
queries and have written a couple of Subs to process the recordsets, but I do
not know how to call the leading Sub to start the process. I know there is a
RunCode Action in the macro, but this will only call out to a function. I am
not passing any values in either direction. My end result will be to dump the
final table to a Report as part of the same macro. Is there a way to call a
Sub from the macro? Do I have to create a Function to call out to the Sub?
PLEASE HELP!!!!!!
Thanks in Advance for your help
Kenny A.
call a Function, but I am not passing any information. In my macro, I run 4
queries. Query 1 clears a table that will receive the final data.Qquery 2
updates a date field for all records in a second table. Query 3 inserts all
records from table 2 into final table. Query 4 selects records from a 3rd
table meeting a date matched on current month and inserts them into the final
table. As part of this macro, I would like to be able to call a Sub to
process through all records in the final table against a table containing
company holidays. I need to check the records in the final table to make sure
the date is not a company holiday or a Saturday or Sunday. I have the 4
queries and have written a couple of Subs to process the recordsets, but I do
not know how to call the leading Sub to start the process. I know there is a
RunCode Action in the macro, but this will only call out to a function. I am
not passing any values in either direction. My end result will be to dump the
final table to a Report as part of the same macro. Is there a way to call a
Sub from the macro? Do I have to create a Function to call out to the Sub?
PLEASE HELP!!!!!!
Thanks in Advance for your help
Kenny A.