Crosstab Subform Not Filtering Correctly and Form Goes Blank (1 Viewer)

CamShann

New member
Local time
Today, 00:22
Joined
Feb 3, 2014
Messages
2
I have a main form which has a crosstab subform. The crosstab subform shows the various carrier types on the rows and the categories of service for the column headings with the information summed. Example of how crosstab subform should be:

Service 1 Service 2 Total
Medical
Commercial
Private
Total Total Total

I use a popup form to filter on the Acct_ID and the Date for the main form which displays account name and various other information. I've written in the Form Load of the main form this code:
Dim rs As Recordset
Set rs = Me.RecordsetClone
If rs.RecordCount = 0 Then
MsgBox "No Data Found For Criteria"
DoCmd.Close
Else
sbf_SuperBillSum.Form.Filter = Me.Filter
sbf_SuperBillSum.Form.FilterOn = True
End If
Problem 1:
The crosstab subform is not filtering correctly. Plus, when it does show the results my rows are no longer grouped to show the total of the various categories but it's showing repeating row names instead of the information being grouped and the row names appearing once with data summed. The dates are not filtering correctly. It's showing all the dates of service for the account. The filter on the main form looks like for example: [Acct_ID]= '000222333ABC' AND [Date] BETWEEN #9/1/2012# AND #2/7/2014#

Problem 2:
Also the message of No Data Found it not coming up when there are no records instead it's showing a blank form. Any help would be appreciated. Thanks in advance. :banghead:
 

Users who are viewing this thread

Top Bottom