Your field is text, so from a alpha standpoint, AVF99 is the highest. You can however isolate just the numeric part of the data, then sort on that. This formula will work in your query as long as AVF is always the prefix - it just needs to be three characters.
Broken down, the Mid statement will isolate the value in your [fieldname] from the 4th character (skipping the first 3 - AVF), and going 20 characters out. 20 is an arbitrary number - it could be 10 or 200 - I assumed 20 would fit the bill. What is isolated is still text at that point, so Cint() will convert it to an integer. You can then sort numerically on that field to acheive the porper order you desire or find the max/min values. Hope this helps.
Brent
Bookmarks