How to make navigation buttons move the record pointer by alphabetic order
Posted on 2011-10-19
Great Day, I have a form where I created navigation buttons - "Delete", "First", "Next", etc. The form has text boxes for customer data and a list box that can go directly to a customer's record; consequently, when the customer's name on the list box is clicked, the data in the text boxes changes to that customer's data. The issue that I would like to correct is that when I click one of the navigation buttons; let's say I click "Next", the record pointer moves to the next record by alphabetic on FirstName. Consequently, if I am on Jimmy Baldwin's record, if I click the "Next" button, the record pointer will go to Karen Russell's record. I would like to be able to click the "Next" button and go to Mary Brockingham's record, who is alphabetically after Baldwin by LastName. Here is the code for the "Next" button:
DoCmd.GoToRecord , , acNext
Dim recClone As DAO.Recordset
Set recClone = Me.Recordset.Clone
I hope I am not making the incorrect assumption that I will be able to correct the other buttons once I am given the solution to the "Next" button :-).
Thanks in advance for your assistance.