If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
conditional calculated field
How do I perform this conditional calculated field in a query or form
if disposition = "booked" then tot=price*quan I want all the records displayed even if disposition "booked". I tried IIF [disposition = "booked"],price*quan. I got #name Thanks for the help. |
#2
|
|||
|
|||
"********" wrote in message
How do I perform this conditional calculated field in a query or form if disposition = "booked" then tot=price*quan I want all the records displayed even if disposition "booked". I tried IIF [disposition = "booked"],price*quan. I got #name Thanks for the help. In addition to correcting your syntax for calling IIf(), you have to decide what you want to appear in the field if disposition "booked". Let's suppose that you want 0 to show in that case. Then you could use the following expression in the controlsource of a textbox: =IIf([disposition]="booked", [price]*[quan], 0) Or you could define it as a calculated field in the form's recordsource query: tot: IIf([disposition]="booked", [price]*[quan], 0) -- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup) |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do a get a report to sort on a calculated field? | Stu | General Discussion | 1 | October 6th, 2004 10:26 PM |
Display two different strings in Calculated Field based on rhe value in another field | Adrian | General Discussion | 1 | August 8th, 2004 08:42 PM |
Problem with calculated controls with data from subforms | Ragnar Midtskogen | Using Forms | 8 | July 25th, 2004 07:18 PM |
No Calculated Field Option in Excel 2002? | David | General Discussion | 1 | July 8th, 2004 11:58 PM |