change focus between objects on a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am relatively new in programming with Access. I am looking for a way to
set focus on one object (Listbox) in a form and remove any selected items
from the other objects (Listbox). Can anyone help?

Thanks in advance
 
To set a focus to another object in the form

Me.[Enter List Box Name here].SetFocus
=================================
To clear the list that was selected in the list box, use this code

For i = 0 To ListBoxName.ListCount - 1
ListBoxName.Selected(i) = false
Next i

To select all the records just change it form false to true
 
Back
Top