null memo field

  • Thread starter Thread starter LGarcia
  • Start date Start date
L

LGarcia

Hi all,
Can someone tell me the correct syntax for returning records where the memo
field is not null?
This returns all records: SELECT tblAudit.AuditID, tblAudit.AuditUser,
tblAudit.AuditTime, tblAudit.AuditTable, tblAudit.AuditBefore,
tblAudit.AuditAfter
FROM tblAudit
WHERE (((tblAudit.AuditAfter) Is Not Null));
AuditAfter is a memo field.
TIA,
LGarcia
 
If that's returning all rows, it implies that your blank memo fields aren't
Null.

To test whether that's the case, try

SELECT tblAudit.AuditID, tblAudit.AuditUser,
tblAudit.AuditTime, tblAudit.AuditTable, tblAudit.AuditBefore,
tblAudit.AuditAfter
FROM tblAudit
WHERE (((Len(tblAudit.AuditAfter & " ")) > 0));

That may be slow, though.
 
Thanks that did it! Didn't notice any slow down.

Douglas J. Steele said:
If that's returning all rows, it implies that your blank memo fields aren't
Null.

To test whether that's the case, try

SELECT tblAudit.AuditID, tblAudit.AuditUser,
tblAudit.AuditTime, tblAudit.AuditTable, tblAudit.AuditBefore,
tblAudit.AuditAfter
FROM tblAudit
WHERE (((Len(tblAudit.AuditAfter & " ")) > 0));

That may be slow, though.
 
I just noticed there's a mistake in what I suggested!

It should be

WHERE (((Len(tblAudit.AuditAfter & " ")) > 1));

or

WHERE (((Len(tblAudit.AuditAfter & "")) > 0));
 

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

Back
Top