Solved

IIF EQUALS A DASH

Posted on 2011-09-25
1
398 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

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