[AccessD] List box populated with data and *nothing* selected

Stuart McLachlan stuart at lexacorp.com.pg
Mon Jan 4 00:20:22 CST 2010


Or 

Me.NameIdYourListobox.Listindex = -1

-- 
Stuart

On 4 Jan 2010 at 17:51, Steve Schapel wrote:

> Darryl,
> 
> This should do the trick...
> Me.NameOfYourListbox = Null
> 
> Regards
> Steve
> 
> 
> --------------------------------------------------
> From: "Collins, Darryl" <Darryl.Collins at anz.com>
> Sent: Monday, January 04, 2010 5:35 PM
> To: "Access Developers discussion and problem solving" 
> <accessd at databaseadvisors.com>
> Subject: [AccessD] List box populated with data and *nothing* selected
> 
> > Hi Folks,
> >
> > I am guessing not a lot of us are lurking, but here goes....
> >
> > I have a form with a list box.  When the form opens and the list box is
> > initially populated, there is no record selected in the list.  This is a
> > good thing for me and how I want things to work.
> >
> > When the user chooses an option in the list, it will return a record set
> > of filtered data in a different subform based on their choice.  All this
> > works swimmingly well.
> >
> > What I would like is a way to return the listbox to a neutral state when
> > the users click on a reset option (which will return *all* records in
> > the other subform).
> >
> > Currently the reset process works perfectly on a technical level, but on
> > a visual level one of the list box options is always left still
> > highlighted, which suggests that the filter is still applied on the
> > highlighted record.
> >
> > I know I could use a combo box for this sort of thing (I often do), but
> > I like the point and click simplicity of the list box approach for this
> > form.
> >
> > Clearly Access is happy to have the list box exist with nothing selected
> > as this is the default position whenever the base form is opened,
> > however how does one return/reset it to that state? A list box populated
> > with data and *nothing* selected?
>  
> 
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com





More information about the AccessD mailing list