Rabu, 30 Mei 2012

[MS_AccessPros] Value of Combo Box

 

I tried writing my first bit of code without help and went down if flames.

I have a form that the user will select a value from a Combo box and then press a button to view the next form, sorted by the combo box.

As the first part of the code I tried to use...

Private Sub Command12_Click()
If [cboSeason] = Null Then
MsgBox "Season field must be filled"
End If

End Sub

The "Null" does not work. If I put a value in there(If [cboSeason] = 1) and then set the combo box to that value it works fine.

What is the value of an unfilled combo box? I figured it would be Null. An empty combo box = Null comes up False.

I am trying to eliminate the Access error boxes when a query is run without the combo boxes being full.

Thanks for your help.
Bill
MN

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar