I needed to generate an output from my Access database that was unavailable using standard functions. I did extensive searching, but when I found example code - it ultimately f
I'm not quite sure what you're trying to achieve with that convoluted function of yours. Do you want to print the position in the alphabet for each letter you read from your database? That could be easily achieved with something like this:
filename = "D:\Temp\_test.txt"
Set rst = CurrentDb.OpenRecordset(QryName, dbOpenDynaset)
Set f= CreateObject("Scripting.FileSystemObject").OpenTextFile(filename, 8, True)
Do Until rst.EOF
v = rst.Fields(fldName).Value
f.WriteLine v & ", " & (Asc(v) - 96)
rst.MoveNext
Loop
f.Close