A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

IIF statement



 
 
Thread Tools Display Modes
  #1  
Old July 13th, 2004, 12:47 AM
Desmond
external usenet poster
 
Posts: n/a
Default IIF statement

I have created the following iff statement to key off of
a text box on a separate form, but it is not working,
what am I doing wrong?

=IIf([Forms]![Query Control Form]![STATE]
="AB","Alabama","Other Region")

I am being told that the expression I entered may contain
invalid syntax. Can you help me?
  #2  
Old July 13th, 2004, 12:26 PM
Jeff Boyce
external usenet poster
 
Posts: n/a
Default IIF statement

Desmond

Nothing jumped out at me. What happens if you rename the form and control,
and rebuild the query? Sometimes Access gets "confused"...

--
Good luck

Jeff Boyce
Access MVP

  #3  
Old June 7th, 2005, 09:24 PM
shooter
external usenet poster
 
Posts: n/a
Default

This may have been already answered. I have a table that consists of 30
fields. These fields have dates as column headings. The other column(s)
have a customer field, and a check box indicating if a payment is promised.

In a query, I would like to only see those customers with a check in the
check box and only those fields that have no nulls.

For example, company A has promised to pay $100 on 06/01/05 and company B
has promised to pay $1000 on 06/03/05.

Is it possible to show only these two fields and not show the remaining
fields?

Sorry iif this is long. Any help is greatly appreciated.
  #4  
Old June 7th, 2005, 11:50 PM
mscertified
external usenet poster
 
Posts: n/a
Default

Yes, just filter them out in your query. Use TRUE/FALSE condition for
checkbox and IS NULL/IS NOT NULL for nulls in your WHERE clause.

"shooter" wrote:

This may have been already answered. I have a table that consists of 30
fields. These fields have dates as column headings. The other column(s)
have a customer field, and a check box indicating if a payment is promised.

In a query, I would like to only see those customers with a check in the
check box and only those fields that have no nulls.

For example, company A has promised to pay $100 on 06/01/05 and company B
has promised to pay $1000 on 06/03/05.

Is it possible to show only these two fields and not show the remaining
fields?

Sorry iif this is long. Any help is greatly appreciated.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
If statement Doug Worksheet Functions 4 June 25th, 2004 01:42 PM
Access 2000 query SQL statement into VBA code Clint Running & Setting Up Queries 1 June 10th, 2004 01:33 PM
help with IF statement Aladin Akyurek Worksheet Functions 0 March 3rd, 2004 08:54 PM
Dynamic range creation for Countif statement elitebpoinfo Worksheet Functions 1 December 27th, 2003 06:01 AM
multiple arrays in single statement Alan Beban Worksheet Functions 2 November 21st, 2003 12:34 PM


All times are GMT +1. The time now is 09:04 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.