Test List Box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello:

On my form I have a 2 list boxes.

When the user selects value from the first box the table's field called
Selected is updated to Yes value in the table. The second box row source is
based on that table and shows the Selected fileld values.

I need to test for null values to make sure that values were selected by the
user before I run my report.
Is there a way to test and refrence 2 nd list box for null values Inothing
selected)?

I hope, this is clear - would appreciate your help.
 
Sub MyButton_Click()
If Len(Me.List2 & vbNullString) > 0 Then
DoCmd.OpenReport "rptWhatever",,,,"ID =" & Me.List2
Else
MsgBox "Select a value in List2", vbOKOnly, "Error"
End If
End Sub
 
Back
Top