another invlaid use of null

jasn_78

Registered User.
Local time
Today, 17:30
Joined
Aug 1, 2001
Messages
214
ok i have searched the forums first and while there is a fair few on invalid use of null i couldnt really find any like this

i have a form where i need the user to enter a number to equal a formula that enables some buttons but if i leave it as null i get the invalid use of null msg is there away to get round this?


If CDbl(Me.txtREGO) = CInt((x) / CInt(Me.txtSERIAL)) Then

Me.cmdQRYREFRESH.Enabled = True
Me.cmdREFRESH.Enabled = True
Else: Me.cmdQRYREFRESH.Enabled = False
Me.cmdREFRESH.Enabled = False

End If
 
The conversion functions can't accept nulls, so you either need to trap for null ahead of time or use the Nz() function within the conversion functions.
 
thanks paul u wouldnt believe it a minute b4 ur answer i found i think another response to this from u on the forum sorry bout that.
 

Users who are viewing this thread

Back
Top Bottom