G
Guest
Hi
I am having a few problems with the following.
I have a form that builds a filter for the system reports. One particular
report has a subform that also needs filtering.
The user can select to see "Completed", "Uncompleted" or "All" Milestones in
the report. When the user selects one of these values from a combo box, I am
saving that value in a global called strMilestone. I then have a function
called getMFilter() that returns the value. In the query for the report I
call getMFilter in the Milestone column.
This works fine when I send the value "Completed" but I can't get it to work
for Not Completed or All. Here is the code I am using to set the value.
If Me.cmbMilestone = 0 Then 'All
strMilestone = ""
ElseIf cmbMilestone = 1 Then 'Completed
strMilestone = "Completed"
Else
strMilestone = "<> 'Completed'" 'Not completed
End If
Can anyone tell me why this isn't working for Not Completed and All?
Thanks in advance
Sandy
I am having a few problems with the following.
I have a form that builds a filter for the system reports. One particular
report has a subform that also needs filtering.
The user can select to see "Completed", "Uncompleted" or "All" Milestones in
the report. When the user selects one of these values from a combo box, I am
saving that value in a global called strMilestone. I then have a function
called getMFilter() that returns the value. In the query for the report I
call getMFilter in the Milestone column.
This works fine when I send the value "Completed" but I can't get it to work
for Not Completed or All. Here is the code I am using to set the value.
If Me.cmbMilestone = 0 Then 'All
strMilestone = ""
ElseIf cmbMilestone = 1 Then 'Completed
strMilestone = "Completed"
Else
strMilestone = "<> 'Completed'" 'Not completed
End If
Can anyone tell me why this isn't working for Not Completed and All?
Thanks in advance
Sandy