I'm trying to get the left 7 characters of a column, and the entirety of a second column from a table in my database. The code I am using to do this looks like this (minus the connection string, don't want to give that away).
rs.Open "SELECT DISTINCT LEFT(Location,7), StopID FROM LocStop", conn
do until rs.eof
You just need to give it an
SELECT DISTINCT LEFT(Location,7) as Location, StopID FROM LocStop
Or you could reference it by it's index: