change focus between objects on a form

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
 
G

Guest

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
 

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