I have a query in Access that retrieves all the record details based on user input on my form for date range and a selection from either one of two combo boxes. A different combo box will display based on a selection from an option group (1 or 2).
My report will hide the detail and show the data grouped by either combo1 (Group) or combo2 (Pyramid). I get the runtime error "The expression is typed incorrectly.....blah blah blah"
The filters passed to the report is as follows:
For combo2:
"([Date] between #10/1/2005# and #02/08/2006#) and [Pyramid] = 'P3'"
For combo1:
"([Date] between #10/1/2005# and #02/08/2006#) and [Group] = 'AAA999'"
My open event for the report is as follows:
Any ideas?
My report will hide the detail and show the data grouped by either combo1 (Group) or combo2 (Pyramid). I get the runtime error "The expression is typed incorrectly.....blah blah blah"
The filters passed to the report is as follows:
For combo2:
"([Date] between #10/1/2005# and #02/08/2006#) and [Pyramid] = 'P3'"
For combo1:
"([Date] between #10/1/2005# and #02/08/2006#) and [Group] = 'AAA999'"
My open event for the report is as follows:
Code:
Option Compare Database
Private Sub Report_Open(Cancel As Integer)
Select Case Forms!frmCriteria!optGrpPyramid
Case 1 'By Group
Me.lblTitle.Caption = "Report by Group"
Me.GroupLevel(0).ControlSource = "Group"
Me.GroupLevel(0).GroupOn = 4
Me.txtGroupID.Visible = True
Me.txtPyramid.Visible = False
Me.lblGroupLevel.Caption = "Group"
Case 2 'ByPyramid
Me.lblTitle.Caption = "Report by Pyramid"
Me.GroupLevel(0).ControlSource = "Pyramid"
Me.GroupLevel(0).GroupOn = 4
Me.txtGroupID.Visible = False
Me.txtPyramid.Visible = True
Me.lblGroupLevel.Caption = "Pyramid"
End Select
End Sub
Any ideas?