View Full Version : Public variables in Query?


CJBIRKIN
05-16-2002, 02:36 AM
Hello
I am currently using the statement below which calls a function i have written to calculate the last day of the month which is based on a selection made on a form.
EndMonthdate([Forms]![CreateDataSetFRM]![Combo5])))/)

However as this date only needs to be calculated once i can run it from the form open procedure and stored the value in a public variable in a module. How do i get the public variable in the Query design page.

Cheers
Chris

ColinEssex
05-16-2002, 02:53 AM
One way you could do it is to assign the last day of the month to a hidden textBox on the form after the selected date is made and refer to that hidden textbox in the query criteria

Col

CJBIRKIN
05-16-2002, 04:27 AM
Cheers! that's worth considering.