Newbies jlazyr Posted February 6, 2002 Newbies Posted February 6, 2002 Is there a way to sort my student records so that they alternate male, female. [ February 06, 2002, 03:31 PM: Message edited by: jlazyr ]
Vaughan Posted February 7, 2002 Posted February 7, 2002 Try this idea: Make a field in the database, lets call it "sortfield". Find all the males in the database (you need to have a way to identify males and females) and sort them however you want. In the found set, perform a Replace by serial number, start at 1 and increment by 2 so the males are all the odd numbers. Perform a find for all the females, sort the records, perform a replace by serial number starting at 2 and incrementing by 2 so they have all the even numbers. Now sort the database by the sort field. The males and females sound be interleaved with males first. LIMITATIONS: because this method relies heavily on the Replace command, it could fail in multi-user environment. The method described should work for all records, it may also work for a subset of the records.
Recommended Posts
This topic is 8326 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now