seltext in listbox

G

Guest

I have a listbox with several entries. When my users click on an entry, it
inverses the colors. Normally it is a white background with black text.
Access reverses it to be a black background with white text for only that
entry - which my users hate.

Is there any way to stop this from happening via VBA? I could use SelText
if it was a combobox to position to the first character but that doesn't work
with a listbox.

I'm stumped....any help would be appreciated.
 
V

Van T. Dinh

It is called "reverse video". They are always the opposite of what you set
in the "ForeColor" and "BackColor" Property of your ListBox.

You can experiment with the above Properties to find a combination that is
suitable in both "normal Video" and "reserve video" modes.
 
G

Guest

thank you... however that doesn't answer my question of positioning the
cursor on the line that is selected in the listbox...is there a way to do
that?
 
V

Van T. Dinh

I don't think there is any way of positioning the cursor since each line is
an *item* (as a whole) in the ListBox and you cannot get into a "part" in
this case.

Note that ComboBox is similar to ListBox but ComboBox has a TextBox inbuilt
in it and ListBox doesn't.

--
HTH
Van T. Dinh
MVP (Access)
 

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