G
Guest
Hi all -
Application: Complaint Ticketing System based on a Table/Form named 'CList'
with:
1. Y/N field 'TClosed' (checked=Complaint resolved, unchecked=Complaint Open)
2. Date field 'CDate' (date that complaint was initially entered)
I'm struggling with the formulation of a where clause in the following
procedure.
The procedure is a Click event procedure for a button on the "CList" form
that should list unresolved complaints (TClosed=False) that are less than 3
days old (System Date minus CDate<3).
Private Sub btnListRecentOpenComplaints_Click()
DoCmd.OpenForm "CList", acFormDS, , "TClosed = False And Date-CDate<3",
acFormEdit, acWindowNormal
End Sub
"TClosed = False And Date-CDate<3" is incorrect because the Date function is
inside of the quotes and it's not recognized as a function. There may be
other problems with this clause, too. Any advice is appreciated.
Application: Complaint Ticketing System based on a Table/Form named 'CList'
with:
1. Y/N field 'TClosed' (checked=Complaint resolved, unchecked=Complaint Open)
2. Date field 'CDate' (date that complaint was initially entered)
I'm struggling with the formulation of a where clause in the following
procedure.
The procedure is a Click event procedure for a button on the "CList" form
that should list unresolved complaints (TClosed=False) that are less than 3
days old (System Date minus CDate<3).
Private Sub btnListRecentOpenComplaints_Click()
DoCmd.OpenForm "CList", acFormDS, , "TClosed = False And Date-CDate<3",
acFormEdit, acWindowNormal
End Sub
"TClosed = False And Date-CDate<3" is incorrect because the Date function is
inside of the quotes and it's not recognized as a function. There may be
other problems with this clause, too. Any advice is appreciated.