Validate If Then

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
 
J

Jeff Boyce

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
 

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