i have a sub form that opens a list of activities.
on this subform i created a button that gives me only sertain activities by a filter.
the problem is the button opens me the subform a second time instead of refreshing the one that is opened
this is my code:
Dim strwhere As String
strwhere = "[activityclosed]![date]> #01/09/2009# And [activityclosed]![date]< #31/08/2010#"
DoCmd.OpenForm FormName:="activityclosedsubform", wherecondition:=strwhere
i think the problem is because of the DoCmd... but i dont know what to write instead.
HELP PLEASE!
thanks
on this subform i created a button that gives me only sertain activities by a filter.
the problem is the button opens me the subform a second time instead of refreshing the one that is opened
this is my code:
Dim strwhere As String
strwhere = "[activityclosed]![date]> #01/09/2009# And [activityclosed]![date]< #31/08/2010#"
DoCmd.OpenForm FormName:="activityclosedsubform", wherecondition:=strwhere
i think the problem is because of the DoCmd... but i dont know what to write instead.
HELP PLEASE!
thanks