Re: Listbox selection



Hi,
If I do this:
Me.lst1.Selected(1) = True

Then the row does becomes highlighted. Are you doing it differently?

--
HTH
Dan Artuso, Access MVP


"Joe Holzhauer" <joedvm@xxxxxxxxxxxxx> wrote in message news:5Bj3e.28135$hU7.13382@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> I'm trying to figure something out about listboxes, any help would be
> appreciated...
>
> Is there a difference between the way a row is selected by a user and the
> way it is selected programmatically? The reason I ask is that when I click
> on a row manually, it becomes highlighted (white text, black BG). When I
> select one programmatically, it gains a border but does not become
> highlighted. Is there a difference?
>
> Here's the context:
> I have a list of items that I want a user to be able to hit 'Y' or 'N' for.
> After the user has hit one or the other, depending on the sort options
> selected, the rowsource is requeried, which often moves the row just rated
> to the bottom of the list. So, I want to save the index of the selected
> row, then reselect that index so that the selected row stays in the same
> place but the next item is selected.
>
> I'm not sure if that's clear, but maybe someone can get me started.
>
> Thanks again!
> Joe
>
>


.



Relevant Pages

  • Re: Cant open new form AND go to new record?
    ... >> HTH ... >> Dan Artuso, Access MVP ... >>> End Sub ...
    (microsoft.public.access.formscoding)
  • Re: looping through a list box
    ... MsgBox Me.lst1.Column ... HTH ... Dan Artuso, Access MVP ...
    (microsoft.public.access.forms)
  • Re: getting started with forms
    ... >> and then add a combo, ethe wizard will click in. ... >> HTH ... >> Dan Artuso, Access MVP ...
    (microsoft.public.access.forms)
  • Re: Creating a new record
    ... > HTH ... > Dan Artuso, Access MVP ... If you have the real estate show the list in a list box or subform and ...
    (microsoft.public.access.forms)
  • Re: Sisters & Guard advice/help
    ... HTH, ... FPs will only delay the ... Still, yeah, they are not a HTH army by a long shot. ... You have a point about the tieing up, but I tend to hit the entire ...
    (rec.games.miniatures.warhammer)