Hi all
Below is a sub procedure firing on the click event on a button on a split form. It does filter the right amount of records. the problem is when the results are show in the split form. Only the fields I filtered are shown. Anyway I can fix it so when I filter the table all the fields are populated.
Right now it looks like
[Blank] [Blank] January 2011 [Blank] [Blank]
[Blank] [Blank] January 2011 [Blank] [Blank]
[Blank] [Blank] January 2011 [Blank] [Blank]
[Blank] [Blank] January 2011 [Blank] [Blank]
for like 1000 records and there is actual date in the table where the blank fields are shown. Any help much apprciated.
'if nothing is filled
If IsNull(Me.ACCT_MONTH) And IsNull(Me.ACCT_Year) Then
Me.FilterOn = False
Exit Sub
ElseIf Me.ACCT_MONTH <> 0 And IsNull(Me.ACCT_Year) Then
'if only model is filled
Me.Filter = "ACCT_MONTH=" & Me.ACCT_MONTH
ElseIf IsNull(Me.ACCT_MONTH) And Me.ACCT_Year <> 0 Then
'if only purpose is filled
Me.Filter = "ACCT_Year=" & Me.ACCT_Year
ElseIf Me.ACCT_MONTH <> 0 And Me.ACCT_Year <> 0 Then
'if both model and purpose are filled
Me.Filter = "ACCT_MONTH=" & Me.ACCT_MONTH & " AND ACCT_Year=" & Me.ACCT_Year
Else: Exit Sub
End If
Me.FilterOn = True
End Sub
Below is a sub procedure firing on the click event on a button on a split form. It does filter the right amount of records. the problem is when the results are show in the split form. Only the fields I filtered are shown. Anyway I can fix it so when I filter the table all the fields are populated.
Right now it looks like
[Blank] [Blank] January 2011 [Blank] [Blank]
[Blank] [Blank] January 2011 [Blank] [Blank]
[Blank] [Blank] January 2011 [Blank] [Blank]
[Blank] [Blank] January 2011 [Blank] [Blank]
for like 1000 records and there is actual date in the table where the blank fields are shown. Any help much apprciated.
'if nothing is filled
If IsNull(Me.ACCT_MONTH) And IsNull(Me.ACCT_Year) Then
Me.FilterOn = False
Exit Sub
ElseIf Me.ACCT_MONTH <> 0 And IsNull(Me.ACCT_Year) Then
'if only model is filled
Me.Filter = "ACCT_MONTH=" & Me.ACCT_MONTH
ElseIf IsNull(Me.ACCT_MONTH) And Me.ACCT_Year <> 0 Then
'if only purpose is filled
Me.Filter = "ACCT_Year=" & Me.ACCT_Year
ElseIf Me.ACCT_MONTH <> 0 And Me.ACCT_Year <> 0 Then
'if both model and purpose are filled
Me.Filter = "ACCT_MONTH=" & Me.ACCT_MONTH & " AND ACCT_Year=" & Me.ACCT_Year
Else: Exit Sub
End If
Me.FilterOn = True
End Sub