Solved

IIF EQUALS A DASH

Posted on 2011-09-25
1
400 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 48

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …
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…

688 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