Assign default value to a listbox

  • Thread starter Thread starter SF
  • Start date Start date
S

SF

Hi,

I have a listbox for listing all my report names. I want to select the first
item in the list by default. How to do that?

SF
 
Hi,
use the list index.
On the on open event of your form you can then programmatically set whatever
value you want e.g.:

Me!lbxSelectReport.SetFocus
Me!lbxSelectReport.ListIndex = 0

This would set the first report to be selected.
HTH
Good luck
 

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

Back
Top