How many columns are in the listbox? Which column is the Bound Column? The
listbox's Value will come from the Bound Column for the selected row.
What is the MultiSelect property (Other tab) of the listbox set at? If it is
at None, then you can only select one row at a time and the above statement
is true. If it is set to Simple or Extended, then you can select more than
one row at a time. The problem is that the listbox can have only one
"value", so getting the value of the listbox when it is set to allow
multiple selections doesn't work. Instead, you have to loop through the
ItemsSelected collection of the list box and get the value of each selected
row. The help file has a very good example of doing this. Search help on the
term ItemsSelected.

Signature
Wayne Morgan
MS Access MVP
>I have a list box that is generated on a form by way of a
> Parameter Query. Problem is whenever I try to refer to the list
[quoted text clipped - 11 lines]
> Thanks for any help,
> dc
doncee - 24 Feb 2006 14:56 GMT
Thanks for the reply. I only have 3 columns & the bound column
is the first one. I am not set for multiselect , shows "none" in
the other property list and am only intersted in one row at a
time right now. I have read the help file but am sure I am
missing something. I have had success in the past with combo
boxes but that will not work for this app. Thanks for the info.
dc
> How many columns are in the listbox? Which column is the
> Bound Column? The listbox's Value will come from the Bound
[quoted text clipped - 11 lines]
> file has a very good example of doing this. Search help on
> the term ItemsSelected.
Wayne Morgan - 24 Feb 2006 15:36 GMT
How are you referring to the listbox? Are you referring to it in code, in a
query, or in another control? What is the statement you are using where you
refer to it?

Signature
Wayne Morgan
MS Access MVP
> Thanks for the reply. I only have 3 columns & the bound column
> is the first one. I am not set for multiselect , shows "none" in
> the other property list and am only intersted in one row at a
> time right now. I have read the help file but am sure I am
> missing something. I have had success in the past with combo
> boxes but that will not work for this app.
doncee - 24 Feb 2006 16:07 GMT
Thanks again for the reply. This is the " after update" code
that I have used but get an error that no records available:
-> Me.RecordsetClone.FindFirst "[memberID] = " & Me![List9]<--
The memberid is an expression field from the original query
underlying the parameter query I use to create the list box.
I have also tried the following as a click event on a
button but also get a null when check the value of the
[memberid] expression:
Dim db As Database
Set db = CurrentDb
Dim stDocName As String
Set rst = db.OpenRecordset("query3", dbOpenDynaset)
Me.Bookmark = Me.RecordsetClone.Bookmark
Debug.Print [MEMBERID]
The above gets me a Null in the immediate pane of the debug
window & of course no records found.
Does any of this make sense? I'm sure I've got something
a.s-backwards but it seems I have used these codes before with
success. It seems as if I am losing my reference to the original
query after I create the list box from the parameter query.
Thanks again for your reply
dc
> How are you referring to the listbox? Are you referring to
> it in code, in a query, or in another control? What is the
> statement you are using where you refer to it?
Wayne Morgan - 26 Feb 2006 02:42 GMT
Do a
Debug.Print Me!List9
before the "Me.RecordsetClone.FindFirst..." and see what that gives you.

Signature
Wayne Morgan
MS Access MVP
> Thanks again for the reply. This is the " after update" code
> that I have used but get an error that no records available:
[quoted text clipped - 23 lines]
>> it in code, in a query, or in another control? What is the
>> statement you are using where you refer to it?
doncee - 26 Feb 2006 09:53 GMT
Thanks again for your reply. I changed the bound column around
on the underlying table\query & all seems fine right now. Not
sure what was wrong with the bound column I was using but am now
finally able to access the records from the list box.
Thanks again
dc
> Do a
>
> Debug.Print Me!List9
>
> before the "Me.RecordsetClone.FindFirst..." and see what
> that gives you.