S
sexton75 via AccessMonster.com
Hello,
I am having a hard time with this one. I have a form that is filtering data
from two unbound text boxes (sdate)- start date and (edate)- end date which
is supposed to allow the user to enter a start and end date to limit results
from the form. (adate) is the activity date it should be filtering on on the
included subform (sFrm_ActivityLog). I formatted all of the fields in date
format, but I keep getting a Runtime error 2442 -you cant assign a value to
this object. Can anyone help me on this?
Here is what I have in the after update part of the code for the sdate and
edate field:
Private Sub SDate_AfterUpdate()
If Not IsNull(Me.SDate) Then
strWhere = strWhere & " AND [adate] >=#" & _
Me!SDate & "# "
End If
If Not IsNull(Me.EDate) Then
strWhere = strWhere & " AND [adate] <=#" & _
Me!EDate & "# "
End If
Me.sFrm_ActivityLog.Form.Filter = strWhere
Me.sFrm_ActivityLog.Form.FilterOn = True
Me.sFrm_ActivityLog.Requery
End Sub
I am having a hard time with this one. I have a form that is filtering data
from two unbound text boxes (sdate)- start date and (edate)- end date which
is supposed to allow the user to enter a start and end date to limit results
from the form. (adate) is the activity date it should be filtering on on the
included subform (sFrm_ActivityLog). I formatted all of the fields in date
format, but I keep getting a Runtime error 2442 -you cant assign a value to
this object. Can anyone help me on this?
Here is what I have in the after update part of the code for the sdate and
edate field:
Private Sub SDate_AfterUpdate()
If Not IsNull(Me.SDate) Then
strWhere = strWhere & " AND [adate] >=#" & _
Me!SDate & "# "
End If
If Not IsNull(Me.EDate) Then
strWhere = strWhere & " AND [adate] <=#" & _
Me!EDate & "# "
End If
Me.sFrm_ActivityLog.Form.Filter = strWhere
Me.sFrm_ActivityLog.Form.FilterOn = True
Me.sFrm_ActivityLog.Requery
End Sub