Unanswered: When there are no records, the code doesn't work.
When ContactStatusID is null the code doesn't work.
Private Sub Command85_Click()
'Open Pending Records For This Month
Form.Filter = "[Rep#]=" & Trim(Me![Combo38].Column(0)) & " AND ([runmonth]) = #6/1/2004#" & " AND ([ContactStatusId])= 2"
Form.FilterOn = True
I have 4 click events like above.
([ContactStatusId])= 1 (this opens not called records)
([ContactStatusId])= 2 (this opens pending records)
([ContactStatusId])= 3 (this opens closed records)
If there are records for ContactStatusId 1,2 or 3 in the database, I can click on the command buttons of each and am able to switch between, not called, pending or closed records. But the problem is; when there's no record for a pending or closed record, I can not switch between not called, pending or closed records. When all the not called records are open and I click on pending or closed, it works, and shows that there are no records for 2 or 3. But from there I can't go back to not called records when I click on the command buttons.
Note: By default all records are open before a sales call is made to them.
Can anyone tell me what I can add to the code to remedy this problem?