MS Access Unbound form needs to automatically select items in list.

MS Access unbound form needs to have users selected.  The two users need to be automatically selected instead of manually selecting the users.
donnie91910Asked:
Who is Participating?
 
Gustav BrockCIOCommented:
Then, after loading the values from the query:

Private Sub Form_Load()

    ' Fill ListBox from your query.

    ' Select the first and second item.
    With Me!ListUsers
        .Selected(0) = True
        .Selected(1) = True
    End With
    
End Sub

Open in new window

0
 
COACHMAN99Commented:
ARE THE USERS IN TWO TEXT BOXES?
AND CAN YOU NOT ASSIGN THE TEXT PROPERTY OF THE BOXES TO THE USERS IN QUESTION?
IF USING A LIST BOX, SET TO MULTI-SELECT and assign accordingly
e.g.
for i as integer = 0 to listbox1.items.count -1
   listbox1.setselected(i,True)
next
0
 
Gustav BrockCIOCommented:
Automatically selected?

How, and by which criteria?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
John TsioumprisSoftware & Systems EngineerCommented:
Just make the values of the users loaded during the Load Event and you should be good to go...better to post a screenshot to give us more info
0
 
donnie91910Author Commented:
The unbound form loads the values in the form with a select statement.  What would the code look like in the Load Event?  I have attached what the form looks like.
0
 
donnie91910Author Commented:
0
 
Gustav BrockCIOCommented:
Answer provided.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.