Access Count query

B

billybanter67

I have a query with 2 fields "Area 1LP: Severity Area 1LP", Area 1HP: Severity Area 1HP. I want to count the number of records with value in the Area 1LP: Severity Area 1LP column and the same for the other field. The query works fine if I manually enter in the data. I get wrong data when I import an Excel spreadsheet. It looks as if that any empty field in the Excel spreadsheet is being seen by access as having a value.

Any tips on how to get around this issue.

Thanks in advance
 
J

John W. Vinson

I have a query with 2 fields "Area 1LP: Severity Area 1LP", Area 1HP: Severity Area 1HP. I want to count the number of records with value in the Area 1LP: Severity Area 1LP column and the same for the other field. The query works fine if I manually enter in the data. I get wrong data when I import an Excel spreadsheet. It looks as if that any empty field in the Excel spreadsheet is being seen by access as having a value.

Any tips on how to get around this issue.

Thanks in advance

What's the datatype of the field in table design view? Text I presume? If so,
what is the field's "Allow Zero Length String" property (it should be No)?

The problem may be that the field has "" - a zero length string - stored in
it. This looks exactly the same as a NULL (no value, undefined, unspecified)
but it's not: it's a well defined, specific text string value zero characters
long. It's useful to set Allow Zero Length sometimes; for instance, you may
want to make the distinction between people who do not HAVE a middle
name/initial and those for whom you just don't know whether they do or what it
is.
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top