Sorting a table with VBA for WORD

A

AndyB

I am populating a listbox (or combobox) in WORD from an ACCESS table with VBA.

How can I specify that the table be sorted before I dump it into the listbox?

Thank you in advance for you help

AndyB

(The *.mdb file is in v2 and I dont have access to v2 software to make a
query and the file needs to stay in v2 for other apps.)
 
G

Guest

You don't need v2 software to make a query.

If you can open the v2 database in your version of
Access, you can make a query. You won't be able to
change forms or tables, but you can create and change
queries.

If you don't have Access or can't open the v2 database
in your version of Access, you can use VBA to open
the database and create a new query.

dim db as dao.database
dim qdf as dao.querydef
set db = opendatabase(...)
set qdf = db.CreateQueryDef (name, sqltext)


(david)
 

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