View Full Version : filtering consecutively


arage
01-08-2001, 05:47 AM
Hi,
One thing I didn’t get across in my post was the need to filter a form by consecutive values. Basically my form shows a ref # unique to ea record. The ref # is a concatenation of 2 record fields (region code & event #)

A region code has a unique director attached so when I open for director dave I see all of the records that have dave as the director attached to the record. This is fine.
Then my problem starts that the entries are then sorted by region code and then by event #. For example for director dave, the ref # might go like this:

1500-1
1500-10
1500-22
1501-3
1501-6
1501-9
1502-5
1502-11….and so on…

1501, 1502…represent agents who work for dave & are valid sub regions under 1500. What I required is for the order to be like this when the form opens

1500-1
1501-3
1502-5
1501-6
1501-9
1500-10
1502-11
1500-22

above the event # are in order 1,3,5,6,9,10,11,22….

So if the open event of my form looks like this:

Public Sub Form_Open(Cancel As Integer)

If Forms![menu]!txtHiddenCode = 1099 Then
DoCmd.ApplyFilter , "[RegionalDirector] = 'Kevin'"
End If

End Sub

What can I do to sort on event # in a consecutive manner like I mentioned above?

I’ve fooled around w/the filter and macro side of access97 but haven’t come up with anything yet. Any ideas?
Thanks!

arage
01-08-2001, 06:22 AM
never mind i seemed to have cleared the problem by keeping the apply filter code by director & then in the code behind the form set an ascending order for the event #