Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If field is null or empty

Status
Not open for further replies.

dinster

Programmer
Apr 12, 2007
54
GB
Hi i have this code which checks for carriage returns ms access 2003 query....

EXAM_Neuro1: Replace([EXAM_Neuro],Chr(10),Chr(13) & Chr(10),1,-1,1)

I get an error msg on the field if its null...how do i take that in to consideration?

Many thanks

 

SELECT Replace([EXAM_Neuro],Chr(10),Chr(13) & Chr(10),1,-1,1)
FROM YourTableName
WHERE EXAM_Neuro Is Not Null
 

And if you care also about empty

SELECT Replace([EXAM_Neuro],Chr(10),Chr(13) & Chr(10),1,-1,1)
FROM YourTableName
WHERE EXAM_Neuro & "" <> ""

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top