I have created a form which tracks activities/status of my clients, and on this form, I have 30 unique date fields to keep track of when 30 activities must/will take place.
Our clients go through a process which in some cases can take up to a year to complete. And throughout the course of the year, my organization must perform services or act in behalf of the client on specific dates.
We have carefully and methodically identified all 30 activity dates and have that level of detail on the main form.
We simply need a report (A tickler report if you will) that will list only those clients who have upcoming activities (current week/following week) that may be in one of the 30 date fields so that we can be proactive in responding to the client in a timely manor.
What I am attempting to do is print a report showing only the clients who have populated dates in one or several of the date fields that fall in between the range of a 1 week time span. (EX: 7/23/2012-7/27/2012)
I know I will need Start and End Date fields for the date range but don’t know if I should put this on a command button or build a query (don’t know how to build either one)
Some of the activity date fields are:
- PropSaleDate
- ActualSaleDate
- RedemptionEndDate
I found the following code to create a query to track one date field:
Private Sub cmdPreview_Click()
Dim strReport As String
Dim strDateField As String
Dim strWhere As String
Dim lngView As Long
Const strcJetDate = "\#mm\/dd\/yyyy\#"
strReport = "rptSales"
strDateField = "[PropSaleDate]" lngView = acViewPreview
If IsDate(Me.txtStartDate) Then
strWhere = "(" & strDateField & " >= " & Format(Me.txtStartDate, strcJetDate) & ")"
End If
If IsDate(Me.txtEndDate) Then
If strWhere <> vbNullString Then
strWhere = strWhere & " AND "
End If
strWhere = strWhere & "(" & strDateField & " < " & Format(Me.txtEndDate + 1, strcJetDate) & ")"
End If
If you look at the strDateField, it only tracks only oneof the many fields I have to track. How do I modify the code to track multiplefields?
It would be helpful if I could perform a print preview prior to printing
Remember if you can assist, please reply in the most elementary terms that you can.
Thank you in advance for your assistance