Criteria and instructions in an expression

L

Linda RQ

Hi Everyone,

Access 2003. I have this expression in my query which is used for a report.
If the DOB field is blank, I would like to insert the word Need DOB. How
can I do this using my query grid?

PtNameRmAdmitNum: [PtLocRmNum] & " " & [BedNumber] & " " & [PtLName] &
", " & [PtFName] & " ( " & [AdmitNum] & ")" & " " & [PtDOB]

Thanks,
Linda
 
J

John Spencer

PtNameRmAdmitNum: [PtLocRmNum] & " " & [BedNumber] & " " &
[PtLName] & ", " & [PtFName] & " ( " & [AdmitNum] & ")" & " " &
Nz([PtDOB],"Need DOB")

'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 
L

Linda RQ

Thanks John..What does NZ stand for...It means if Null?


John Spencer said:
PtNameRmAdmitNum: [PtLocRmNum] & " " & [BedNumber] & " " & [PtLName]
& ", " & [PtFName] & " ( " & [AdmitNum] & ")" & " " & Nz([PtDOB],"Need
DOB")

'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================


Linda said:
Hi Everyone,

Access 2003. I have this expression in my query which is used for a
report. If the DOB field is blank, I would like to insert the word Need
DOB. How can I do this using my query grid?

PtNameRmAdmitNum: [PtLocRmNum] & " " & [BedNumber] & " " & [PtLName]
& ", " & [PtFName] & " ( " & [AdmitNum] & ")" & " " & [PtDOB]

Thanks,
Linda
 
J

John Spencer

NZ is a function that returns the value in the first argument unless
that value is Null and then it returns the value specified in the second
argument.

I believe NZ is an acronym for Null To Zero (changes nulls to zero).



'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================


Linda said:
Thanks John..What does NZ stand for...It means if Null?


John Spencer said:
PtNameRmAdmitNum: [PtLocRmNum] & " " & [BedNumber] & " " & [PtLName]
& ", " & [PtFName] & " ( " & [AdmitNum] & ")" & " " & Nz([PtDOB],"Need
DOB")

'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================


Linda said:
Hi Everyone,

Access 2003. I have this expression in my query which is used for a
report. If the DOB field is blank, I would like to insert the word Need
DOB. How can I do this using my query grid?

PtNameRmAdmitNum: [PtLocRmNum] & " " & [BedNumber] & " " & [PtLName]
& ", " & [PtFName] & " ( " & [AdmitNum] & ")" & " " & [PtDOB]

Thanks,
Linda
 

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