J
James Warburton
I'm having trouble getting a calculated field ((A) below)
to work that I have in a query, and that itself is based
on two other calculated fields in the query ((B) and (C)
below).
(A)
Suppress?: IIf([Lone Pre Op?]="Lone Pre Op" And [Book Ops
& Pre Ops?]="Book Ops & Pre Ops","Suppress","Show")
(B)
Lone Pre Op?: IIf(IsNull([dbo_tblOperationSlots.dtDate])
And Not IsNull([dbo_tblOperationSlots.dtPreOpDate]),"Lone
Pre Op","Not Lone Pre Op")
(C)
Book Ops & Pre Ops?: IIf([dbo_tblHealthTrusts.txtName]
="North West London Hospitals NHS Trust" Or
[dbo_tblHealthTrusts.txtName]="The Lewisham Hospital NHS
Trust" Or [dbo_tblHealthTrusts.txtName]="Epsom and St.
Helier NHS Trust" Or [dbo_tblHealthTrusts.txtName]="St
Marys NHS Trust" Or (([dbo_tblSpeciality.txtName]="Ophth")
And ([dbo_tblHealthTrusts.txtName]="King's College
Hospital Trust")),"Book Ops & Pre Ops","Pre Ops Only /
Duals")
When I try to run the query I just get one of those "Enter
Parameter Value" boxes come up, which is asking for a
value for the field [Lone Pre Op?], when I just wanted (A)
to draw a value for [Lone Pre Op?] from (B) (and for [Book
Ops & Pre Ops?] from (C) ..)
Is there a problem with the syntax in field (A)?
Thanks in advance.
to work that I have in a query, and that itself is based
on two other calculated fields in the query ((B) and (C)
below).
(A)
Suppress?: IIf([Lone Pre Op?]="Lone Pre Op" And [Book Ops
& Pre Ops?]="Book Ops & Pre Ops","Suppress","Show")
(B)
Lone Pre Op?: IIf(IsNull([dbo_tblOperationSlots.dtDate])
And Not IsNull([dbo_tblOperationSlots.dtPreOpDate]),"Lone
Pre Op","Not Lone Pre Op")
(C)
Book Ops & Pre Ops?: IIf([dbo_tblHealthTrusts.txtName]
="North West London Hospitals NHS Trust" Or
[dbo_tblHealthTrusts.txtName]="The Lewisham Hospital NHS
Trust" Or [dbo_tblHealthTrusts.txtName]="Epsom and St.
Helier NHS Trust" Or [dbo_tblHealthTrusts.txtName]="St
Marys NHS Trust" Or (([dbo_tblSpeciality.txtName]="Ophth")
And ([dbo_tblHealthTrusts.txtName]="King's College
Hospital Trust")),"Book Ops & Pre Ops","Pre Ops Only /
Duals")
When I try to run the query I just get one of those "Enter
Parameter Value" boxes come up, which is asking for a
value for the field [Lone Pre Op?], when I just wanted (A)
to draw a value for [Lone Pre Op?] from (B) (and for [Book
Ops & Pre Ops?] from (C) ..)
Is there a problem with the syntax in field (A)?
Thanks in advance.