C
cho
Dear All,
last time I tried to create a filter to my subform.I entered the below
code but VB send Message
Run Time Error 2448
You can't assign a value to this object
VB Highligted the last two line
Please Help what's wrong with that Code
Dim strWhere as String
strWhere = "1=1 "
If Not IsNull(Me.txtFrom) Then
strWhere = strWhere & " And [Date]>=#" & Me.txtStart & "# "
End If
If Not IsNull(Me.txtUntill) Then
strWhere = strWhere & " And [Date]<=#" & Me.txtEnd & "# "
End If
If Not IsNull(Me.cboModel) Then
strWhere = strWhere & " And [Model]=""" & Me.cboModel & """ "
End If
Me.sfrmData.Form.Filter = strWhere
Me.sfrmData.Form.FilterOn=True
last time I tried to create a filter to my subform.I entered the below
code but VB send Message
Run Time Error 2448
You can't assign a value to this object
VB Highligted the last two line
Please Help what's wrong with that Code
Dim strWhere as String
strWhere = "1=1 "
If Not IsNull(Me.txtFrom) Then
strWhere = strWhere & " And [Date]>=#" & Me.txtStart & "# "
End If
If Not IsNull(Me.txtUntill) Then
strWhere = strWhere & " And [Date]<=#" & Me.txtEnd & "# "
End If
If Not IsNull(Me.cboModel) Then
strWhere = strWhere & " And [Model]=""" & Me.cboModel & """ "
End If
Me.sfrmData.Form.Filter = strWhere
Me.sfrmData.Form.FilterOn=True