Criteria and instructions in an expression

  • Thread starter Thread starter Linda RQ
  • Start date Start date
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
 
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
'====================================================
 
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
 
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
 
Back
Top