ListBox Value

D

DS

I want to be able to click on an Unbound Listbox even if it hasn't any
records in it and return a value to an unbound textbox. This value has
absolutly nothing to do with the contents of the listbox. I just need
this value in the unbound textbox to know that this is where the record
should be inserted to.
Thanks
DS
 
D

Douglas J Steele

Listboxes have a Click event. To invoke it with an empty listbox, you need
to click at the top of the listbox (where the first row should be)
 
D

DS

Douglas said:
Listboxes have a Click event. To invoke it with an empty listbox, you need
to click at the top of the listbox (where the first row should be)
I tried that...Sometimes I can Sometimes I can't....It seems that there
is no logic to when I can and when I can't. Am I missing smething?
Thanks
DS
 
D

Douglas J Steele

DS said:
I tried that...Sometimes I can Sometimes I can't....It seems that there
is no logic to when I can and when I can't. Am I missing smething?

Are you always clicking as high up as you can? A black band should appear
for the first row when you've selected it.
 
D

DS

Douglas said:
Are you always clicking as high up as you can? A black band should appear
for the first row when you've selected it.
Yeah I am, Like I said sometimes yes, sometimes no. Could it be the
Query undernaeath?
Thanks
DS
 
D

Douglas J Steele

DS said:
Yeah I am, Like I said sometimes yes, sometimes no. Could it be the
Query undernaeath?

Hmm. To be honest, I just put an empty listbox when I tested. You're right:
when you've got a RowSource defined, it doesn't seem to work.

You could try putting two controls on the form: the listbox and a textbox
that's the same size. Check whether or not the listbox has any values in it,
and make the listbox visible if so, and the textbox visible otherwise.
 
D

DS

Douglas said:
Hmm. To be honest, I just put an empty listbox when I tested. You're right:
when you've got a RowSource defined, it doesn't seem to work.

You could try putting two controls on the form: the listbox and a textbox
that's the same size. Check whether or not the listbox has any values in it,
and make the listbox visible if so, and the textbox visible otherwise.
Good Suggestion Doug. Thanks
DS
 
Top