G
Glint
Hi Guys,
I have a form based on a query which I sorted by descending date. The query
performs fine. But I just found that when I use some filters on my form, the
sorting becomes erratic.
This is a sample of the filter:
Me.Filter = "[Zone] Is Not Null"
If Not IsNull(Area1) Then
Dim A As String
A = "SELECT Zones.ZoneID FROM Zones WHERE
(((Zones.Area)=Forms!SatsangClassSchedule!Area1))"
Me.Filter = Me.Filter & " And [Zone] IN (" & A & ")"
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 2, , acMenuVer70
MsgBox "Records filtered according to Area.", vbInformation,
"ECKANKAR AREA ADMIN"
If Me.RecordsetClone.RecordCount = 0 Then Exit Sub
End If
The [Zone] field is never null; so in essence, "[Zone] IS NOT NULL" should
return all records. When I run the code above, I get the reocrds I want but
do not get them sorted in descending order of date as the in underlying
query. What am I doing wrong?
I have a form based on a query which I sorted by descending date. The query
performs fine. But I just found that when I use some filters on my form, the
sorting becomes erratic.
This is a sample of the filter:
Me.Filter = "[Zone] Is Not Null"
If Not IsNull(Area1) Then
Dim A As String
A = "SELECT Zones.ZoneID FROM Zones WHERE
(((Zones.Area)=Forms!SatsangClassSchedule!Area1))"
Me.Filter = Me.Filter & " And [Zone] IN (" & A & ")"
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 2, , acMenuVer70
MsgBox "Records filtered according to Area.", vbInformation,
"ECKANKAR AREA ADMIN"
If Me.RecordsetClone.RecordCount = 0 Then Exit Sub
End If
The [Zone] field is never null; so in essence, "[Zone] IS NOT NULL" should
return all records. When I run the code above, I get the reocrds I want but
do not get them sorted in descending order of date as the in underlying
query. What am I doing wrong?