473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

isnull not working



I imported a tab delimted text file and am now trying to select all fields
that have a blank field in fieldB.

isnull(fieldB)
nothing is returned
i tried fieldB = ""
= " "
I trimmed it and still nothing

what else can I try?
The fields that are blank have no spaces, they are just blank. What is the
character in there?

Thanks
Nov 12 '05 #1
12 3959
Check the Length of the field:

If len(YourField) = 0 Then
do whatever<<
End If

To correctly check IsNull:

If IsNull(YourField) Then
...whatever here
End If

--
Scott McDaniel
CS Computer Software
Visual Basic - Access - Sql Server - ASP
"Jim's wife" <ta*****@mindspring.com> wrote in message
news:Kp********************@news4.srv.hcvlny.cv.ne t...

I imported a tab delimted text file and am now trying to select all fields
that have a blank field in fieldB.

isnull(fieldB)
nothing is returned
i tried fieldB = ""
= " "
I trimmed it and still nothing

what else can I try?
The fields that are blank have no spaces, they are just blank. What is the character in there?

Thanks

Nov 12 '05 #2
That does not work either
"Scott McDaniel" <sc***@no.spam.thedatabaseplace.net> wrote in message
news:FP********************@comcast.com...
Check the Length of the field:

If len(YourField) = 0 Then
>>do whatever<< End If

To correctly check IsNull:

If IsNull(YourField) Then
..whatever here
End If

--
Scott McDaniel
CS Computer Software
Visual Basic - Access - Sql Server - ASP
"Jim's wife" <ta*****@mindspring.com> wrote in message
news:Kp********************@news4.srv.hcvlny.cv.ne t...


I imported a tab delimted text file and am now trying to select all

fields that have a blank field in fieldB.

isnull(fieldB)
nothing is returned
i tried fieldB = ""
= " "
I trimmed it and still nothing

what else can I try?
The fields that are blank have no spaces, they are just blank. What is

the
character in there?

Thanks


Nov 12 '05 #3
"Jim's wife" <ta*****@mindspring.com> wrote in news:Kp6Qb.4034$O22.1076660
@news4.srv.hcvlny.cv.net:
what else can I try?


posting your code ...

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Nov 12 '05 #4
Using Scott McDaniel's idea to test for length, I'd also use the Asc()
function to get the Ascii value of the character. If it doesn't show in
normal views, it is likely a non-printing character, but getting its
Ascii value will give you a handle on it.

In a query's field, testing a field named "EmailAddr":
TestEmail: IIf(Len([EmailAddr])>=0,Asc([EmailAddr]),999)

This shows 999 if null, or the character's ascii value if not null
(Asc() returns an integer)

You could also use:
TestEmail: IIf(Len([EmailAddr])>=0,Asc([EmailAddr]))
which will leave a null display if Length is not >= 0.

Bruce Pick

Jim's wife wrote:
I imported a tab delimted text file and am now trying to select all fields
that have a blank field in fieldB.

isnull(fieldB)
nothing is returned
i tried fieldB = ""
= " "
I trimmed it and still nothing

what else can I try?
The fields that are blank have no spaces, they are just blank. What is the
character in there?

Thanks

Nov 12 '05 #5
Where are you trying to do this. In a query, you would choose fieldB in the
Field row and for the Criteria use

Is Null

as 2 words.

--
Wayne Morgan
MS Access MVP
"Jim's wife" <ta*****@mindspring.com> wrote in message
news:Kp********************@news4.srv.hcvlny.cv.ne t...


I imported a tab delimted text file and am now trying to select all fields
that have a blank field in fieldB.

isnull(fieldB)
nothing is returned
i tried fieldB = ""
= " "
I trimmed it and still nothing

what else can I try?
The fields that are blank have no spaces, they are just blank. What is the character in there?

Thanks

Nov 12 '05 #6
"Jim's wife" <ta*****@mindspring.com> wrote:
what else can I try?


How about telling us where you're trying to use IsNull - in a query? In a
VBA function?
Nov 12 '05 #7
I tested this on my own table successfully:

In a query's field, testing a field named "fieldB":
TestFieldB: IIf(Len([fieldB])>=0,Asc([fieldB]),999)

This shows 999 if null, or the character's ascii value if not null
(Asc() returns an integer)

You could also use:
TestFieldB: IIf(Len([fieldB])>=0,Asc([fieldB]))
which will leave a null display if Length is not >= 0.

Bruce Pick

Jim's wife wrote:
I imported a tab delimted text file and am now trying to select all fields
that have a blank field in fieldB.

isnull(fieldB)
nothing is returned
i tried fieldB = ""
= " "
I trimmed it and still nothing

what else can I try?
The fields that are blank have no spaces, they are just blank. What is the
character in there?

Thanks

Nov 12 '05 #8
Because of 'null propagation' use:
IIf(Len([fieldB] & ' ' )>=0,Asc([fieldB]),999)
appending something to a null field, converts the null to a zero length
string
"Bruce Pick" <br********@comcast.net> wrote in message
news:Ps********************@comcast.com...
I tested this on my own table successfully:

In a query's field, testing a field named "fieldB":
TestFieldB: IIf(Len([fieldB])>=0,Asc([fieldB]),999)

This shows 999 if null, or the character's ascii value if not null
(Asc() returns an integer)

You could also use:
TestFieldB: IIf(Len([fieldB])>=0,Asc([fieldB]))
which will leave a null display if Length is not >= 0.

Bruce Pick

Jim's wife wrote:
I imported a tab delimted text file and am now trying to select all fields that have a blank field in fieldB.

isnull(fieldB)
nothing is returned
i tried fieldB = ""
= " "
I trimmed it and still nothing

what else can I try?
The fields that are blank have no spaces, they are just blank. What is the character in there?

Thanks

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.563 / Virus Database: 355 - Release Date: 1/17/2004
Nov 12 '05 #9
Try

if len(FieldB & vbnullstring) = 0 then
'do whatever
end if

"Jim's wife" <ta*****@mindspring.com> wrote in message
news:Kp********************@news4.srv.hcvlny.cv.ne t...


I imported a tab delimted text file and am now trying to select all fields
that have a blank field in fieldB.

isnull(fieldB)
nothing is returned
i tried fieldB = ""
= " "
I trimmed it and still nothing

what else can I try?
The fields that are blank have no spaces, they are just blank. What is the character in there?

Thanks

Nov 12 '05 #10
Try

if len(FieldB & vbnullstring) = 0 then
'do whatever
end if

"Jim's wife" <ta*****@mindspring.com> wrote in message
news:Kp********************@news4.srv.hcvlny.cv.ne t...


I imported a tab delimted text file and am now trying to select all fields
that have a blank field in fieldB.

isnull(fieldB)
nothing is returned
i tried fieldB = ""
= " "
I trimmed it and still nothing

what else can I try?
The fields that are blank have no spaces, they are just blank. What is the character in there?

Thanks

Nov 12 '05 #11
Try

if len(FieldB & vbnullstring) = 0 then
'do whatever
end if

"Jim's wife" <ta*****@mindspring.com> wrote in message
news:Kp********************@news4.srv.hcvlny.cv.ne t...


I imported a tab delimted text file and am now trying to select all fields
that have a blank field in fieldB.

isnull(fieldB)
nothing is returned
i tried fieldB = ""
= " "
I trimmed it and still nothing

what else can I try?
The fields that are blank have no spaces, they are just blank. What is the character in there?

Thanks

Nov 12 '05 #12
Hi,

I have found similar cases using ODBC

The trick is to add text to the field
then look for the text at the start of the field.
[YourDataField]& "#@#"

There may be a better technical answer, but this works.

Peter

Jim's wife wrote:
I imported a tab delimted text file and am now trying to select all fields
that have a blank field in fieldB.

isnull(fieldB)
nothing is returned
i tried fieldB = ""
= " "
I trimmed it and still nothing

what else can I try?
The fields that are blank have no spaces, they are just blank. What is the
character in there?

Thanks


Nov 12 '05 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Trev | last post by:
I have two tables, tblMTO and tblIMPORT_MTO. If I import an entire MTO into the import table I want to create a delta from it (i.e. leave only the changed items). I have a view (simplified) ...
12
by: Generic Usenet Account | last post by:
I am going through some legacy code that has an "isNull()" method defined on certain classes. I can see that this can be a good way to eliminate certain types of crashes, by making this the first...
6
by: Eric J Owens | last post by:
TIA! I recently moved some forms from an a2k mdb file to an a2k adp. There is now an error when opening one of the forms 'the isnull function requires 2 arguments', but I only find references...
4
by: Markus | last post by:
I receive the foolwoing error in my report : "You entered an expression that has no value" In my report i am summing up the all orders with the control =Sum() This control is called Bonus. I...
3
by: Jan Nielsen | last post by:
Hi I am working with rowfilters in dataviews. I would like to filter for empty fields (= null value in the database) I found this sentence on msdn: **************** To return only those columns...
4
by: Paul Spratley | last post by:
Hi all Firstly this my first time posting to technical groups - so any mistakes I apologise for in advance. I am trying to count records in several secondary tables for the same run in a...
16
by: madeleine | last post by:
Please can someone help me, I think I may go mad with this one: Do While Not IsNull(CDate(FormatDateTime(rst!F1.Value, vbShortDate))) If IsNull(CDate(FormatDateTime(rst!F1.Value, vbShortDate)))...
4
by: jimm.sander | last post by:
Hello, Problem: Im using isnull() in vbscript to determine if a field returned from a ado object call is in fact null. The problem is when I use isnull in anything other than a response.write()...
22
by: PW | last post by:
Hi All, I go into debug mode with the code below and varReturnVal is Null, but the code still is run. Any idea why? Dim varReturnVal As Variant Dim intDogID As Integer
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.