List Box Default Selection

G

Guest

I have a list box based on a query to display its values. When the user
opens the form, the list box requery's to get the values for the default
record on opening. Also on the form is a subform based on the users
selection in the list box. Is there any way that when the form is opened, i
can default the list box to have the first item in the list selected, so that
the subform displays this data for the first item in the list box, without
the user having to select it?
 
A

Allen Browne

Set the Default Value property of the list box to:
=[MyListbox].[ItemData](0)

This assumes these properties for the list box:
Name MyListbox
Column Headings No
Multi Select No
 

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