VBA and queries

M

mikebo

I have a table that shows, among other things, 2 dates, a beginning date and
an end date. My goal is to calculate the number of working days. I do have
VBA code that is supposed to calcualte this. However, I don't seem to be able
to call this function from within a query. How do I do this?

Sorry if this is a dumb question.

mike
 
K

Ken Snell [MVP]

Put the function in a regular module (Modules from database window). Name
the module a different name from the function name. Make sure the function
is Public. Then you should be able to have your query call it.
 
M

mikebo

Bingo!!

I didn't know that the module and the function must have different names.

Thanks.
 
Top