checking a Null entry for a form

AshikHusein

Registered User.
Local time
Today, 12:56
Joined
Feb 7, 2003
Messages
147
I would like to know what I am doing wrong here.

I have a form with fields from related tables. One of the fields is named IPO_name.

In the table which has the IPO_name field, its properties are set to say that a zero length field shld not be allowed for this field.

Now when the button is clicked I have the following code which is to be executed.

Private Sub Command28_Click()
If [IPO_name].Value = Null Then
MsgBox ("You have not entered the IPO name." & vbCrLf & "If you dont want to save this entry press the 'Clear Entries' button")
Else
DoCmd.Close acForm, "frm_IPO_init_entry"
End If
End Sub

But even when no value is entered in the IPO_name field it still goes through the ELSE part of the if statement. Can anybody guide me as to what is wrong here? :(
 
Thank you very much.
 

Users who are viewing this thread

Back
Top Bottom