make table query sorts data in wrong order

G

Guest

I have a table with 1.3 million records in an access database slighly less
that 1GB. I want to sort it by SSN So that I can run a VB program to get
information from the preceeding record.

I do a make table query, sorting by SSN (the first field). The data appears
to sort but when you look closely you can find some SSNs that are out of
order. SSN is indexed and duplicates are allowed. It works as expected in
small datasets but

How can I get all the SSNs to sort so that I can process them in the right
order in a module in VB?
 
K

Ken Snell [MVP]

Assuming that SSN is a text field, you may be dealing with slight
differences in how the SSN was entered. Can you give us some examples of
"incorrect" sorting? And some samples of the SSN data?

--

Ken Snell
<MS ACCESS MVP>

"Out of Order in Ann Arbor" <Out of Order in Ann
(e-mail address removed)> wrote in message
news:[email protected]...
 
D

Douglas J. Steele

Are you assuming that just because the Make Table query was sorted that the
records in the table will be sorted, and that you can simply open the table
as a recordset? That's not usually a valid assumption.

Your recordset should still use an ORDER BY clause in it.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



"Out of Order in Ann Arbor" <Out of Order in Ann
(e-mail address removed)> wrote in message
news:[email protected]...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top