#NULL# is a tough issue because you can't evaluate it other than if it's null. Select case is looking for a value and #NULL# data cannot be evaulated to anything other than #NULL#. What you might do is use CASE ELSE and then when the comparison falls through all the other case statements you can catch it by using the standard "if isnull(fieldname) = true then (operation)" evaluation.
thanks lads no wonder I was having such a mare trying to get it to work
I did do one other thing I changed the DB so that its default value was "" which I could evaluatate for but useful to know that I can't do that.
I will try sonofemidex1100's solution see if that works aswell.
Ok tried it and that works fine aswell
Thanks alot guys to answers
Change DB or use that iffy
Based on what you are looking for, try:
Select Case Val(rsADO("test" & vbNullString)
Case 0 'Will catch if field is a NULL, "", or 0
Case Else
End Select
Or,
Select Case rsADO("test" & vbNullString
Case "0", vbNullString 'Will catch if field is a NULL, "", or 0
Case Else
End Select [/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
> Case "", 0, IsNull(DBrec![build_weapons]
??
IsNull() returns True or False. The value of a field with Null does not. [/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
I know exactly! what you mean... [/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.