I understand you cannot run an sql Select statement in VBA.
So I tried the following
But that did nothing. So obviously wrong. Although works fine in direct mode.
How would I get the desired result in code? Thanks.
So I tried the following
Code:
sql = "SELECT AAAA.Field1 FROM AAAA ORDER BY (Asc(Mid([Field1]," & AplhaPos & ",1))+Asc(Mid([Field1]," & AplhaPos + 1 & ",1)));"
Set srt = CurrentDb.OpenRecordset(sql)
srt.OpenRecordset
DoEvents
srt.Close
How would I get the desired result in code? Thanks.