Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Nested IIf Functions
Stephen B 

10 years ago
Hi Alex. I tried your suggestion and got the same error message in the query. I simplified it even more, using

IIf([RoomID]=2,[BasicTourCost],"NOT CALCULATED")

I got the same error message.

I then changed the join type between the tables in the query to show ALL records from the TourT, irrespective of whether there was a booking.

When I re-ran the query I saw the text message, from the ELSE part of the IIF function was being displayed. The problem was only occurring when a booking was made.

To cut a very long story short, when I examined the field properties of the RoomID in the TourXClientT (where it is a foreign key) I found it set to TEXT instead of NUMBER. This prevented the relationship link being set up properly and was the cause of the whole problem.

Such a simple thing caused me to waste many hours but it's a lesson I will never forget. Thank you so much for your suggestion that finally helped me to identify the cause of the error message.


Reply from Alex Hedley:

Glad you got it working, Number/Text issues can occur lots so it's a good one to keep an eye out for.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/17/2026 6:21:09 AM. PLT: 0s