HalloweenWeed
Member
- Local time
- Today, 08:05
- Joined
- Apr 8, 2020
- Messages
- 220
Sorry, I am self-taught, don't know all the naming conventions, I just try my best to follow the examples I have seen.Let me get this straight, the name of your order query is "tblCnf"? Recommend you read the thread on naming conventions. That type of naming convention only adds confusion. qryCnf maybe?
So your printed the Sql string to the immediate window. Did you drop it into the query designger? Did it sort correctly? I do not know what you are doing wrong, but something is wrong with your logic or the sql. I have never seen or heard of an example where you cannot force a recordset to sort.
Although rarely used you can sort a recordset.
dim rs = dao.recordset
set rs = .....
rs.sort = "lastName, FirstName"
dim rsSorted as dao.recordset
set rsSorted = rs.openrecordset
Hmm, interesting, I was planning on going back in the future to redo this subroutine to use a recordset entirely in memory rather than the hard table. If I get to this I will try it (however I am about to have a second interview for a different job, same employer different agency, and it may not leave me with the time to do this FYI). I didn't know I could do this. Thank you for the tip. This was just the sort of solution that I was looking for with this thread.