Solved

IIF EQUALS A DASH

Posted on 2011-09-25
1
397 Views
Last Modified: 2012-05-12
I can not get Access to recognize a dash   I have tried everything I know and it still will not read it  The below is what I used on the latest try

Timeform: IIf([TIMEFORMCODE]="*-*",1,0)
0
Comment
Question by:JackJackson54
1 Comment
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 total points
ID: 36595425
I assume this is in a query, and you are trying to set the value of the "Timeform" field to either 1 or zero. But from your description, you want it to be a 1 if [TimeFormCode] = "-", but your code is using wildcards, which implies that you want if [TimeFormCode] contains a dash, which is it?

If #1, then try:

Timeform: IIF([TIMEFORMCODE] = "-", 1, 0)

If #2, then try:

Timeform: IIF(instr([TIMEFORMCODE], "-") > 0 , 1, 0)



0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question