Re: Method to query all items from a multiselect=none listbox???



Doug,
It's not really clear to me...
I can't select multiple items because when I DblClick on one of them I
have a separate form poping up with all items details.
I just want to find a way to "order" the machine to go and get all the
items currently listed in the listbox and create a report.
I know you must be pulling your hair by now but...have you any other
ideas.

I followed the link but I don't understand how should I create a hidden
control to concatenate all listed items using a WHERE clause...
Maya

Douglas J. Steele wrote:
You cannot use a multi-select list box like that as a parameter for a query
(even if only one item is selected from the list)

What you need to do is dynamically generate the SQL once you've selected all
of the desired items from the list.

See http://www.mvps.org/access/forms/frm0007.htm at "The Access Web" for an
example.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


<smmaya@xxxxxxxx> wrote in message
news:1156019330.956288.248440@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Dear all,
I really need help, can't find anywhere what I need to do. I need to
keep my listbox multiselection set to "none" because of the DblClick
event that opens a form with all the data...but I want my query to list
all items listed in the Form's listbox after search and this without
slecting them...(I can't do it anyway because it is not a valid option)
Until now my query displays only one selected item???

My MultiResearch Form is unbound as well as all its controls
The RowSource of the listbox [lstResults] is a SQL statement

My Query has:
Field: IncID
Table: T_Incidents
Criteria: [Forms]![F_MultiResearch]![lstResults]

but it doesn't work, it returns only one selected item...

Any help will be more than welcome.
Maya


.



Relevant Pages

  • Re: Method to query all items from a multiselect=none listbox???
    ... Doug Steele, Microsoft Access MVP ... I can't select multiple items because when I DblClick on one of them I ... keep my listbox multiselection set to "none" because of the DblClick ... event that opens a form with all the data...but I want my query to list ...
    (microsoft.public.access.formscoding)
  • Re: How to limit Access listbox lookup query using another field
    ... Microsoft Access MVP ... listbox of Level2 field are using the value of the Level1 field in the first ... not the record for which I am currently selecting the listbox. ... For the RowSource for the listbox of Level2 I have the folloing query ...
    (microsoft.public.access.queries)
  • Re: Sort contents of listbox
    ... Reviewing the query might be the best bet. ... Dave Hargis, Microsoft Access MVP ... like to be able to sort the listbox by clicking on a heading. ...
    (microsoft.public.access.formscoding)
  • Re: Listbox, Dropdownbox, Data in one column not visible
    ... At some point in time a listbox shows ... this listbox is a query. ... Are you using Access 2003 and did you recently apply Service Pack 3? ... Rick Brandt, Microsoft Access MVP ...
    (microsoft.public.access.formscoding)
  • Re: delete the source table for a displayed listbox
    ... Microsoft Access MVP ... If I try to delete the table or run a make table query, ... message saying it can't delete it because the table is in use. ... Is there a way around this and still have the listbox on this form? ...
    (microsoft.public.access.formscoding)