Check for Value in ListBox

Taff

Registered User.
Local time
Today, 18:48
Joined
Feb 3, 2004
Messages
158
Hi All,

I have a form with a listbox on it. I also have a command button which when clicked opens a new form.

What i am trying to achieve is when my command button is clicked if column(7) in any of my rows is null, a message box to appear saying "Please complete field".

Any ideas?

Thanks for ya help


Ant
 
Code:
Dim var As Variant
For Each var In Me.MyListbox.ItemsSelected
    If IsNull(Me.MyListbox.Column(7, var)) Then
        MsgBox "Enter details.", vbExclamation
        Exit Sub    
    End If
Next
 

Users who are viewing this thread

Back
Top Bottom