Validate If Then

  • Thread starter Thread starter Jani
  • Start date Start date
J

Jani

Before opening another form, I need to check to see if a list box selection
is an * (for all locations). If it does, then a message needs to be displayed
that a location needs to be selected and the focus set back to the list box;
if the * is not selected in the list box than a form needs to be opened. Can
anyone help me with code on this? Much thanks in advance, Jani
 
Jani

(untested aircode...)

If Me.lstYourListBox.Column(x) = "*" Then
...
Else
...
End If

(note that the value of "x" needs to be the n-1 column of the query that
feeds your listbox -- .Column() is zero-based)

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Back
Top