If/ Then Help

Blackops

Registered User.
Local time
Yesterday, 16:37
Joined
Mar 23, 2011
Messages
14
Hello,

I'm hoping someone can assist me with an issue I have been having. I have been using access for 8 years now, but it's all self taught and my limitation have been reached with coding/ expression.

My question is; I would like to have a field named "Certificate", show the following message (Certificate will be provided upon request) when any data at all is in the field. I'm trying to do this in a query. I found this expression on the net and tried to change it to suit my needs.

DisplayText: IIf([Certificate]=Is Not Null,"Certificate will be provided upon request",)
Am I completely wrong? Any help at all would be appreciated. Thank you in advance.

I'm sorry I understand now. It never occurred to me to just delete the field from the query and allow the new expression to display the message I want for it to display. Thank you very much for your help.

I do have one other question on the same topic. How can I modify the Expression to return the same text if the "Certificate" field has a certain entry.

Example: If the field [Certificate]show LH-11-0001, how can I make it show the text i want it so show "Cerificate will be provided upon request".


Answer:

Try

DisplayText: IIf([Certificate]="LH-11-0001","Certificate will be provided upon request", "")



I thought I would post my question into a new thread as I did get the answer to it, however I have another question concerning it. The answer did work for what I needed it to do which was provide the text indicated if the field "Certificate" had LH-11-0001. I'm trying to acomplish something similar in another query with a different field name and different values, however, I'm coming up with errors. I think it's because the first field was a TEXT field and now I'm trying to do the same to a Number field. Do I need to modify the answer to accomidate Number fields?

Perhaps there are some hidden zeros within the field I'm not seeing since it's a Number field and that is why I'm coming up with errors. Not sure.
 
Sorry, I found the answer. If the field is a Number field than I need to do away with the quotes.
 

Users who are viewing this thread

Back
Top Bottom