I need assitance with my IIF statement.
IIf([Reports]![RptMaster]![ChkBxs]="1",True,IIf([Reports]![RptMaster]![ChkBxs]="2",False,IIf([Reports]![RptMaster]![ChkBxs]="3",,)))
I have a column in my table that stores values from a check box in my form.
I have a form that has a option group in it, and it has 3 buttons to select from. Depending on the value, you can get 1, 2 or 3 as your value; hence my IIF statement. Selection "1" will allow my report to filter my data for only checked boxes to display on my report. Selection "2" will allow my report to filter my data for only unchecked boxes to display on my report. Selection "3" is suppose to show all of them, but I am having dificulty with this. Can anyone help me figure this out?
Thanks in Advance.
5 1840
Try this instead: -
IIf([Reports]![RptMaster]![ChkBxs]="1",True,IIf([Reports]![RptMaster]![ChkBxs]="2",False,IIf([Reports]![RptMaster]![ChkBxs]="3","*",)))
Also, do you need the option for if nothing is selected? If not, you could go with: -
IIf([Reports]![RptMaster]![ChkBxs]="1",True,IIf([Reports]![RptMaster]![ChkBxs]="2",False,"*"))
For either of these to work properly, you would need the criteria to evaluate to "[TableColumn] Like IIf..."
Let me know if you have any questions.
Gnawoncents,
I tried both of your suggestions, the first one gave me a error message saying it was too complex. The other one nothing showed...
Once you get the result from the IIF statement, how are you using it? Please be as specific as you can. That will give me a better idea of what you need.
Okay, these are the steps:
1. When the Main report opens, it bring a form that has 2 fields for Dates, then There is a option group below the fields. (this is were I click to select what type of filtering is needed.)
2. Next, I click on the preview button which then opens my report.
I have attached a sample of the database.
Thanks again.
Mario
Okay,
I did my best to leave most of your coding intact. I modified some VBA and the SQL for a record source or two. Let me know if you have any questions.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Mark Morton |
last post by:
I'm writing an if statement for a UK credit card form validation
script. Users who specify that their card is Switch need to enter
either the issue number or the 'valid from' date.
I'm trying to...
|
by: Jon |
last post by:
Hi all
I know this is not the preferred newsgroup, but you people are great with
SQL
MS ACCESS, VISUAL BASIC6
Hope you can see past my table, string definitions (Swedish), just ask
otherwise
...
|
by: Maksim Sipos |
last post by:
Hello,
I would like to have something like
#ifdef VERSION_DEBUG
#define DEBUG(x) DebugFnc(x)
#end
#ifdef VERSION_RELEASE
#define DEBUG(x) <empty-statement>
#end
|
by: matvdl |
last post by:
I have a system that was originally developed in asp - the pages are saved in
SQL (there are over 10,000 pages) and saved to a temp directory in the server
when requested by a client.
I have...
|
by: Clark Endrizzi |
last post by:
I just sent this twice before with the wrong email address so it didn't
go through, that is why I am sending this so that it will get through.
I hope this isn't causing issues.
Hi guys. I...
|
by: Clark Endrizzi |
last post by:
Hi guys. I certainly hope this is the correct place to email this. I'm
having an issue that I have really tried to solve but can't.
I'm using RHEL's postgresql 7.3.4 and everything works great...
|
by: Ivan |
last post by:
Hi to all !!! And thanks to answer my topics.
I have problems when I try of run stored procedures, show diferents
errors. I made one test with one example of the tutorials. The example
is this
...
|
by: patriciashoe |
last post by:
Everything I read indicates the following statement should work. What happens is that any field after the where clause gets treated as a parameter by Access. Even if I supply the data the query...
|
by: Lebbsy |
last post by:
I have a datasheet form that on opening I want to select only the records whose Decision field value is "Recommend". I have the following SQL statement so far but it gives me the "cannot execute...
|
by: Fary4u |
last post by:
Hi,
I'm attempting to update a record via the recordset.update method, However, the recordset object is defined and accesses the correct record that I want to update, as I can retrieve field...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |