F
Fay Yocum
On a form I have an option group that based on which selection you make and
the date entered places a date with the logical symbols in front of the
date. for example <=#03/31/2005#. When I enter the parameter
[Forms]![frmReports]![txtTestResults] on the QBE I get the following error
message: "This expression is typed incorrectly, or it is too complex to
evaluated..."
If I type the same thing in manually I get the correct results. Here is the
code used to develop the results in the txtTestResults textbox.
Private Sub frmDates_AfterUpdate()
'Dim Dates As Integer
Select Case frmDates 'select the date range
Case 1
txtRosterStart.Visible = True
txtRosterEnd.Visible = False
lblRosterStart.Caption = "Date"
txtCriteria.Value = "<"
txtTestResults = txtCriteria & "#" & Format(txtRosterStart,
"mm/dd/yyyy") & "#"
stWhere = txtTestResults
Case 2
txtRosterStart.Visible = True
txtRosterEnd.Visible = False
lblRosterStart.Caption = "Date"
txtCriteria.Value = ">"
txtTestResults = txtCriteria & "#" & Format(txtRosterStart,
"mm/dd/yyyy") & "#"
Case 3
txtRosterStart.Visible = True
txtRosterEnd.Visible = False
lblRosterStart.Caption = "Start date"
txtCriteria.Value = "="
txtTestResults = txtCriteria & "#" & Format(txtRosterStart,
"mm/dd/yyyy") & "#"
Case 4
txtRosterStart.Visible = True
txtRosterEnd.Visible = False
lblRosterStart.Caption = "Date"
txtCriteria.Value = ">="
txtTestResults = txtCriteria & "#" & Format(txtRosterStart,
"mm/dd/yyyy") & "#"
Case 5
txtRosterStart.Visible = True
txtRosterEnd.Visible = False
lblRosterStart.Caption = "Date"
txtCriteria.Value = "<="
txtTestResults = txtCriteria & "#" & Format(txtRosterStart,
"mm/dd/yyyy") & "#" End Select
Fay
the date entered places a date with the logical symbols in front of the
date. for example <=#03/31/2005#. When I enter the parameter
[Forms]![frmReports]![txtTestResults] on the QBE I get the following error
message: "This expression is typed incorrectly, or it is too complex to
evaluated..."
If I type the same thing in manually I get the correct results. Here is the
code used to develop the results in the txtTestResults textbox.
Private Sub frmDates_AfterUpdate()
'Dim Dates As Integer
Select Case frmDates 'select the date range
Case 1
txtRosterStart.Visible = True
txtRosterEnd.Visible = False
lblRosterStart.Caption = "Date"
txtCriteria.Value = "<"
txtTestResults = txtCriteria & "#" & Format(txtRosterStart,
"mm/dd/yyyy") & "#"
stWhere = txtTestResults
Case 2
txtRosterStart.Visible = True
txtRosterEnd.Visible = False
lblRosterStart.Caption = "Date"
txtCriteria.Value = ">"
txtTestResults = txtCriteria & "#" & Format(txtRosterStart,
"mm/dd/yyyy") & "#"
Case 3
txtRosterStart.Visible = True
txtRosterEnd.Visible = False
lblRosterStart.Caption = "Start date"
txtCriteria.Value = "="
txtTestResults = txtCriteria & "#" & Format(txtRosterStart,
"mm/dd/yyyy") & "#"
Case 4
txtRosterStart.Visible = True
txtRosterEnd.Visible = False
lblRosterStart.Caption = "Date"
txtCriteria.Value = ">="
txtTestResults = txtCriteria & "#" & Format(txtRosterStart,
"mm/dd/yyyy") & "#"
Case 5
txtRosterStart.Visible = True
txtRosterEnd.Visible = False
lblRosterStart.Caption = "Date"
txtCriteria.Value = "<="
txtTestResults = txtCriteria & "#" & Format(txtRosterStart,
"mm/dd/yyyy") & "#" End Select
Fay