Do I use and IIF statement to display another field or not? What

C

Carolyn S.

Hi -

I am trying to get my scheduling database to display one field over anotehr
is a conditional statement is correct.

For Example:
Bob is assigned to be a Parker so I need the Parker Report Time to display
instead of the Cashier Report Time.

I wrote this Iif statement:
Report Time: IIf([Availaibilty]![Assignment]="Parker"," [Event]![Parker
Report Time]"," [Event]![Cashier Report Time] ")

and it's working correctly but instead of showing my the time to report, it
just shows "[Event]![Parker Report Time]". Is there anyway to get this to
link to the actual numeric time?

Thanks!!
Carolyn
 
F

fredg

Hi -

I am trying to get my scheduling database to display one field over anotehr
is a conditional statement is correct.

For Example:
Bob is assigned to be a Parker so I need the Parker Report Time to display
instead of the Cashier Report Time.

I wrote this Iif statement:
Report Time: IIf([Availaibilty]![Assignment]="Parker"," [Event]![Parker
Report Time]"," [Event]![Cashier Report Time] ")

and it's working correctly but instead of showing my the time to report, it
just shows "[Event]![Parker Report Time]". Is there anyway to get this to
link to the actual numeric time?

Thanks!!
Carolyn

Incorrect quotes, and you most likely do not need the table names
(unless you have the same field names in both tables).

ReportTime: IIf([Assignment]="Parker",[Parker
Report Time],[Cashier Report Time])

Note: It's not a good idea to include spaces in field names. I've
taken the liberty of removing your space from the column header name
"Report Name".
 
C

Clifford Bass

Hi Carolyn,

You are telling it to display those strings by the fact that you
enclosed within quote symbols. Try this, without the quotes:

Report Time: IIf([Availaibilty]![Assignment]="Parker",[Event]![Parker
Report Time],[Event]![Cashier Report Time])

Clifford Bass
 
K

KARL DEWEY

Lose the quotes --
Report Time: IIf([Availaibilty]![Assignment]="Parker"," [Event]![Parker
Report Time], [Event]![Cashier Report Time])
 
C

Carolyn S.

THANK YOU THANK YOU THANK YOU!!!!

Jerry Whittle said:
Remove all the double quotes " except those around Parker.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


Carolyn S. said:
Hi -

I am trying to get my scheduling database to display one field over anotehr
is a conditional statement is correct.

For Example:
Bob is assigned to be a Parker so I need the Parker Report Time to display
instead of the Cashier Report Time.

I wrote this Iif statement:
Report Time: IIf([Availaibilty]![Assignment]="Parker"," [Event]![Parker
Report Time]"," [Event]![Cashier Report Time] ")

and it's working correctly but instead of showing my the time to report, it
just shows "[Event]![Parker Report Time]". Is there anyway to get this to
link to the actual numeric time?

Thanks!!
Carolyn
 
J

John W. Vinson

Hi -

I am trying to get my scheduling database to display one field over anotehr
is a conditional statement is correct.

For Example:
Bob is assigned to be a Parker so I need the Parker Report Time to display
instead of the Cashier Report Time.

I wrote this Iif statement:
Report Time: IIf([Availaibilty]![Assignment]="Parker"," [Event]![Parker
Report Time]"," [Event]![Cashier Report Time] ")

and it's working correctly but instead of showing my the time to report, it
just shows "[Event]![Parker Report Time]". Is there anyway to get this to
link to the actual numeric time?

Thanks!!
Carolyn

It's giving you what you're asking for - the literal text string in the
quotes.

Remove the quotes around the [Event] etc.

Also, I'd use periods rather than exclamation marks as delimiters - the !
delimiter is used for form and control (and other collection) references,
tablenames and fieldnames should be delimited with periods.
 

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