ListBoxes Tied to Query

M

ManpowerSteve

First problem: I need two lst boxes (or one if its a better way) lstbox1
contains FieldNames from table, when you click on CmdBtn it moves selected
items to lstbox2. This becomes the "meat" of the strSQL statement "SELECT
DISTINCT (lstbox2) FROM tbl_Whatever WHERE". I can add a textbox that can
cover the WHERE portion of the strSQL. However, I can't figure out how to
get the fields to move from lstbox1 to lstbox2.
SecondProblem: can I use a DoCmd to run the strSQL so that it outputs the
results either to a DS or export to Excel.

Basically, what I'm trying to do is allow my users to select the fields they
want to be in a query (which they can then export to Excel) instead of
exporting all 100 fields then having to clean up the Excel spreadsheet.

Steve
 

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