S
Sharon
Hi,
My query is based on some fields in a form.
If the user wants to determine which dates will appear in
the query, he ticks this option and makes - [Forms]!
[F_Menu]![DateV] to be true.
I tried to create a function that should return
the string with the criteria of the query and in the
criteria, I called this function.
The function looks like that:
Function GetDateCriteria()
If [Forms]![F_Menu]![DateV] = True then
GetDateCriteria = ">=[Forms]![F_Menu]![FromDate]
And <=[Forms]![F_Menu]![ToDate]"
Else
GetDateCriteria = "" 'I tried Null as well
End If
End Function
But it didn't work.....
Is it possible to do it like that?
Thanks in advance,
Please help me......
Sharon
..
My query is based on some fields in a form.
If the user wants to determine which dates will appear in
the query, he ticks this option and makes - [Forms]!
[F_Menu]![DateV] to be true.
I tried to create a function that should return
the string with the criteria of the query and in the
criteria, I called this function.
The function looks like that:
Function GetDateCriteria()
If [Forms]![F_Menu]![DateV] = True then
GetDateCriteria = ">=[Forms]![F_Menu]![FromDate]
And <=[Forms]![F_Menu]![ToDate]"
Else
GetDateCriteria = "" 'I tried Null as well
End If
End Function
But it didn't work.....
Is it possible to do it like that?
Thanks in advance,
Please help me......
Sharon
..