Null Error...

Iceman Solope
10-13-2004, 12:16 PM
Hi there,

I have a little problem in access 2002

I have a Private Sub on access and this Sub have a procedure that needs that a textbox have a value, so I want to avoid a Null Error

for example


Private Sub cmdActualizaActualizar_Click()
if StrDate.Value = "" Then
MsgBox ("Please fill all the textbox")
Else
Actualize
End If
End Sub

Private Sub Actualize()
strDate as String
strDate = txtDate.Value
End Sub


But when I run this Program, the program send me an Null error! on the line in the Actualize Procedure.

So my question is, how can I do in order to avoid the Null Error?


Thnks for ur helping

DaddyHarris
10-13-2004, 01:09 PM
Hi there,

I have a little problem in access 2002

I have a Private Sub on access and this Sub have a procedure that needs that a textbox have a value, so I want to avoid a Null Error

for example


Private Sub cmdActualizaActualizar_Click()
if StrDate.Value = "" Then
MsgBox ("Please fill all the textbox")
Else
Actualize
End If
End Sub

Private Sub Actualize()
strDate as String
strDate = txtDate.Value
End Sub


But when I run this Program, the program send me an Null error! on the line in the Actualize Procedure.

So my question is, how can I do in order to avoid the Null Error?


Thnks for ur helping

Should'nt you be checking to see if txtdate.Value is blank and not the string variable.

NEOLLE
10-13-2004, 11:48 PM
Hi,
Instead of using StrDate.Value = "", use Len(StrDate.Value) = 0 instead. Its much faster. :)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum