Good Afternoon,
I have a couple of dropdowns on a form set up for report selection. Based on the selections, a textbox changes values for the appropriate parameters in the query the reports are based off of.
Here's the problem: I refer to the textbox in the query as [forms]![frmReportCriteria]![txtTalkTimeParameter] The two parameters that can be passed are <10 or Between 10 And 30. This is the code that feeds the txtTalkTimeParameter box...
This works fine for the <10 designation, but if it is the Between 10 and 30, I get an error stating "This Expression is typed incorrectly, or it is too complex to be evaluated, etc..." If I actually type Between 10 and 30 it works, but if I use the text box to do it, it doesn't. Any ideas?
Thanks,
Elysynn
I have a couple of dropdowns on a form set up for report selection. Based on the selections, a textbox changes values for the appropriate parameters in the query the reports are based off of.
Here's the problem: I refer to the textbox in the query as [forms]![frmReportCriteria]![txtTalkTimeParameter] The two parameters that can be passed are <10 or Between 10 And 30. This is the code that feeds the txtTalkTimeParameter box...
Code:
Private Sub cboReportGT10_Change()
If Me.cboReportGT10.Value > 0 Then
Me.txtTalkTimeParameter.Value = "BETWEEN 10 AND 30"
Me.cboReportLT10 = ""
Else
Me.txtTalkTimeParameter = Null
End If
End Sub
Private Sub cboReportLT10_Change()
If Me.cboReportLT10.Value > 0 Then
Me.txtTalkTimeParameter.Value = "<10"
Me.cboReportGT10 = ""
Else
Me.txtTalkTimeParameter = Null
End If
End Sub
This works fine for the <10 designation, but if it is the Between 10 and 30, I get an error stating "This Expression is typed incorrectly, or it is too complex to be evaluated, etc..." If I actually type Between 10 and 30 it works, but if I use the text box to do it, it doesn't. Any ideas?
Thanks,
Elysynn