Criteria variable not working

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a crtiteria in a query set to >=[MonthsNotUsed]. MonthsNotUsed is a
public integer defioned in a module and set in a couple of forms. The form
then runs the query but a window comes up asking for the value for
MonthsNotUsed. Don't get it.

Mike
 
Queries don't recognize variable, to solve this problem, in the module create
a function that return the variable

Function Get_MonthsNotUsed() As Integer
Get_MonthsNotUsed = MonthsNotUsed
End Function

In the query you can use the function
= get_MonthsNotUsed()
--
\\// Live Long and Prosper \\//
BS"D


mjj4golf said:
I have a crtiteria in a query set to >=[MonthsNotUsed]. MonthsNotUsed is a
public integer defioned in a module and set in a couple of forms. The form
then runs the query but a window comes up asking for the value for
MonthsNotUsed. Don't get it.

Mike
 
Back
Top