Go Back   Access World Forums > Microsoft Access Discussion > Reports

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 10-12-2019, 04:47 AM   #1
aattas
Newly Registered User
 
Join Date: Dec 2014
Posts: 56
Thanks: 12
Thanked 0 Times in 0 Posts
aattas is on a distinguished road
Value from IIF statement

gents,

I have a report that has an IIf statement (unbound field) as follows:
=IIf([First of Codecat]=2,[AccessTotalsFORWARDTO]*1)

=IIf([First of Codecat]=3,[AccessTotalsFORWARDTO]*2)

=IIf([First of Codecat]=0,[AccessTotalsFORWARDTO]*0)

the result came out perfectly, but when i want to use the resulted value in VBA or Query. The system says no such value even though I created a field to transfer the IIF value to it as follows:
me.catone.value = me.text22.value

catone is the new field, and text22 is the unbound field creating the IIF.

Why the system do not recognize the value resulted from IIF as a valid value.

Thanks

aattas is offline   Reply With Quote
Old 10-12-2019, 06:10 AM   #2
arnelgp
error reading drive A:
 
arnelgp's Avatar
 
Join Date: May 2009
Location: somewhere out there
Posts: 8,401
Thanks: 68
Thanked 2,703 Times in 2,588 Posts
arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice
Re: Value from IIF statement

you can directly put the Expression on catone field.
__________________
"Never stop learning, because life never stops teaching"
arnelgp is offline   Reply With Quote
The Following User Says Thank You to arnelgp For This Useful Post:
aattas (10-12-2019)
Old 10-12-2019, 06:28 AM   #3
aattas
Newly Registered User
 
Join Date: Dec 2014
Posts: 56
Thanks: 12
Thanked 0 Times in 0 Posts
aattas is on a distinguished road
Re: Value from IIF statement

Thanks .I will try

aattas is offline   Reply With Quote
Old 10-12-2019, 06:39 AM   #4
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 4,610
Thanks: 50
Thanked 1,053 Times in 1,034 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: Value from IIF statement

Hi. If it still doesn't work, can you show us how you tried to use the value in VBA? Cheers.

__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is online now   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
add recordet set into insert statement and print the statement to text file zentel Modules & VBA 4 06-15-2016 04:35 AM
Update statement for a OUTER JOIN Select Statement. aniyahudi Queries 2 02-12-2014 01:47 PM
LOST! SQL STATEMENT as recordsource to listbox on case statement Shaunk23 Modules & VBA 5 04-11-2012 07:12 AM
Long IIf Statement with Or statement inside BrianFawcett Reports 1 07-20-2011 08:10 PM
Change Code from IF statement to CASE statement papic1972 Modules & VBA 6 06-16-2008 03:26 PM




All times are GMT -8. The time now is 04:54 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World