Solved

IIF EQUALS A DASH

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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

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 been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

733 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