473,419 Members | 1,564 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,419 software developers and data experts.

Create IIf Statement for Query

I have two tables I'm using in a query. I have pulled several fields
from 'tblEmployeeList' and need to pull a Yes/No field
'FileStampNumber' from the table 'tblFileStamps'. However, I need to
create a statement saying that if field 'CurrentFile-Stamp?' is true,
then display 'FileStampNumber', else "N/A". I have written the
statement as follow:

IIf([tblFileStamps]![CurrentFile-Stamp?]=True,[tblFileStamps]![FileStampNumber],"N/A")

The field name in the query is 'FileStampNumber'. When I run the query
though, I get the error message that "The expression is typed
incorrectly, or it is too complex to be evaluated. For example, a
numeric expression may contain too many complicated elements. Try
simplifying the expression by assigning parts of the expression to
variables."

Does anyone know how I do this or if creating variables would fix the
problem? Thanks in advance!

Nov 13 '05 #1
2 1942
Hi there,

Have you tried to remove the questionmark? It could cause many problems
for Access as it tries to work out what you mean...

Rob.

i5t3n wrote:
I have two tables I'm using in a query. I have pulled several fields
from 'tblEmployeeList' and need to pull a Yes/No field
'FileStampNumber' from the table 'tblFileStamps'. However, I need to
create a statement saying that if field 'CurrentFile-Stamp?' is true,
then display 'FileStampNumber', else "N/A". I have written the
statement as follow:

IIf([tblFileStamps]![CurrentFile-Stamp?]=True,[tblFileStamps]![FileStampNumber],"N/A")
The field name in the query is 'FileStampNumber'. When I run the query though, I get the error message that "The expression is typed
incorrectly, or it is too complex to be evaluated. For example, a
numeric expression may contain too many complicated elements. Try
simplifying the expression by assigning parts of the expression to
variables."

Does anyone know how I do this or if creating variables would fix the
problem? Thanks in advance!


Nov 13 '05 #2
Ok, I tested by removing the question mark, to no avail. Thanks for the
input though!! Let me know if you have any other ideas - much
appreciated!

Kristen

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: lkrubner | last post by:
I have a webserver through Rackspace. I create a domain. I create an FTP user. I upload some files. I create a database called testOfSetupScript and then I create a database user named setup. I...
4
by: Thomas Jerkins | last post by:
When I write a create table SQL statement I want to add some information about the column heading of each column. How does the exact syntax for the create table look like (which includes this column...
6
by: Bruce | last post by:
I want to create a new table based on an existing table, but I don't want the tables to have any enforced relationship. Is this possible without having to do a CREATE TABLE and an INSERT? ...
3
by: Peter Phelps | last post by:
My problem is as follows: I need automatically iterate through a single field in a table and use the values in the field to create an in-statement. Currently, the character limitation in the...
4
by: ITMA | last post by:
Any Google search will show that somewhere out there is a kind spirited Michel Walsh has been most generous in his time over the years in giving, in reply to several postings on the matter, a...
3
by: Miya | last post by:
I am building a calendar to enter and display training courses. I have a table with the fields CourseID, TrainingDate, TrainingStartTime and TrainingEndTime. Some courses are one day while others...
10
by: Zack Sessions | last post by:
Has anyone tried to create a SQL7 view using the CREATE VIEW command and ADO.NET? If so, is there a trick in trapping a SQL error when trying to create the view? I have a VB.NET app that, amoung...
8
by: chrisdavis | last post by:
I'm trying to filter by query or put those values in a distinct query in a where clause in some sort of list that it goes through but NOT at the same time. Example: ROW1 ROW2 ROW3 ROW4 ,...
3
by: creative1 | last post by:
Here is how you create a complex data report that involves parent and child commands and you can update information at runtime. Its pretty straight forward to work with simple queries; however,...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.