Display Message When Nothing Is Selected From The Listbox.

Aleni

Registered User.
Local time
Today, 13:41
Joined
Dec 6, 2012
Messages
45
Hi!

I have a form which contains listbox and a button.
When a user clicks on the button i want to open another form only if something is selected from listbox.
If user clicks on the button without selecting anything from the list box i want to display a msg saying the user to select something from the list box.

First part i could do but I have problem with the second part.

What is the way to solve it?
 
Try this..
Code:
If (Me.[COLOR=Blue]fieldList[/COLOR].ItemsSelected.Count = 0) Then
    Call MsgBox("Please SELECT atleast one field from the List.", vbInformation, "Missing Information")
    Exit Sub
End If
Change the blue bits..
 
Thank you pr2-eugin.
Its working fine now.
 

Users who are viewing this thread

Back
Top Bottom