I have an MS Access database which contains records on drawing files. Each record has a drawing number field in which a sequential number is manually entered. I have an Excel spreadsheet as well that is related to this database. What I wish to do is to have the user click a button in Excel to start the process by which the Excel VBA code will open the database, read in the last record to establish the most recent drawing number assigned, add 1 to it and then enter the new record about the drawing into the database.

My problem is that so far the testing I've done, which is no where near what I'm describing above, I notice that the records in the database are not necessarily in sequential order. That is the record which has the highest drawing number may not necessarily be the last record. So I'm assuming that I will need to sort the records on this drawing number field first before reading in the last record.