Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access IF statement

Status
Not open for further replies.

Sadukar

Technical User
Feb 19, 2003
159
IE
Hi All,
In access 2000 I have a form with a drop down menu called DROPDOWN1. The line origin is taken from a query.

I have a button that prints a report according to what is displayed in the DROPDOWN1.

I want a msgbox to pop and say that "a report name must be picked" if there is none selected.
I have tried the following and it does not work.

If DROPDOWN1 = Null Then
MsgBox "A Report must be picked"
Else
End If
(Print code also)

Any sugestions

Thanks
S.
 
If DROPDOWN1.text = "" Then
MsgBox "A Report must be picked"
Else
End If


Rgds
Geoff
Si hoc legere scis, nimis eruditionis habes
 
Hi Sadukar,

Checking for something "= Null" ALWAYS returns FALSE, you should use If IsNull(DROPDOWN1) Then

Enjoy,
Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top