Hello,
I am trying to change a filter for a subform (Default) that has a filter based on a drop down box with a Search button to a filter based on radio buttons.
However, I don't understand the current query enough to begin to change it. Here is the command that opens the query which has a subquery as well. - DoCmd.OpenQuery ("QryAccounts")
Here is the part of the query I am having difficulty with: - FROM QryAccountsSub
-
LEFT JOIN ActiveUsers
-
ON QryAccountsSub.[Account Number]
-
= ActiveUsers.[Account Number]
-
WHERE ((
-
(QryAccountsSub.[Account Number])
-
=IIf(IsNull([Forms]![Default]![Account])
-
,[QryAccountsSub].[Account Number]
-
,([Forms]![Default]![Account])))
-
AND
-
((QryAccountsSub.QQ)
-
=IIf(IsNull([Forms]![Default]![st])
-
,[QQ]
-
,IIf([Forms]![Default]![st]="All"
-
,[QQ]
-
,IIf([Forms]![Default]![st]="Pre-Installed"
-
,1
-
,IIf([Forms]![Default]![st]="Q Accounts"
-
,0
-
,[QQ])))))
-
AND
-
((QryAccountsSub.Act)
-
=IIf(IsNull([Forms]![Default]![st])
-
,1
-
,IIf([Forms]![Default]![st]="All"
-
,[Act]
-
,IIf([Forms]![Default]![st]="Active Accounts"
-
,1
-
,[Act]))))
-
AND ((QryAccountsSub.LL)
-
=IIf(IsNull([Forms]![Default]![st])
-
,[LL]
-
,IIf([Forms]![Default]![st]="All"
-
,[LL]
-
,IIf([Forms]![Default]![st]="Pre-Installed"
-
,1
-
,[LL])))))
Here is the subquery: - SELECT Accounts.*
-
, IIf(IsNull([Q Date])
-
,1
-
,0)
-
AS QQ
-
, IIf(IsNull([Live Date])
-
,1
-
,0)
-
AS LL
-
, IIf(IsNull([Q Date])
-
And [Live Date]<Date()+20
-
,1
-
,0)
-
AS Act
-
FROM Accounts
-
ORDER BY Accounts.[Account Number];
The combo box is named st and has 4 values: "All";"Pre-Installed";"Q Accounts";"Active Accounts.
Can anyone give me some insight into where/how to change values so that I can change from a combo box to radio buttons? Also, is there any way to simplify this? Thanks!
2 1463
Hello,
I figured this out. Rather than trying to understand this query, I just replaced the values "All";"Pre-Installed";"Q Accounts";"Active Accounts" in the query with 1,2,3,4 and renamed the radio button frame to st. It appears to work.
Thanks!
zmbd 5,501
Expert Mod 4TB
Sorry, late to the party. (^_^)
Radio controls as set up in a frame control return a numeric value to the frame. This why your 1,2,3,4 worked in the query.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: sman |
last post by:
Hi, I recently read this article on About.com on how to create
required fields for a form:
http://javascript.about.com/library/scripts/blformvalidate.htm
Everything works great except that there...
|
by: Jeff |
last post by:
I'm trying to create a dynamic form that can have multiple groups of
radio buttons (each group has two buttons) with the same name.
Essentially, the form allows a user to enter as many names as...
|
by: Oscar Monteiro |
last post by:
I Have to sets of Radio buttons like so:
<input type="radio" name=p1 value=1>
<input type="radio" name=p1 value=2>
<input type="radio" name=p1 value=3>
<br>
<input type="radio" name=p2 value=1>...
|
by: James P. |
last post by:
Help,
I need to display radio buttons on a form. The data is from SQL
table: each row in each table is displayed as a radio button. I have
multiple SQL tables so I understand I need to put...
|
by: dpazza |
last post by:
Hi,
I'm creating a quiz on using a form in VB 2005 express.
I have four sets of questions and answers (labels and radio buttons)
and I change between which set of questions is currently shown on...
|
by: Blasting Cap |
last post by:
I have a page that has a number of radio buttons that will be displayed
to different access levels of a user who logs in to my website.
For instance, if there are a dozen buttons, user1 will see...
|
by: yajiv.vijay |
last post by:
I am just started using getElementsByTagName. I dont know how to
filter radio buttons from all other INPUT fields. Is there any way to
do that without looping through all the INPUT fields?
|
by: Twayne |
last post by:
Hi,
Newbie to PHP here, no C or other relevant background, so pretty niave
w/r to the nuances etc. but I think this is pretty basic.
XP Pro, SP2+, PHP 4.4.7, XAMPP Local Apache Server...
|
by: gengyue |
last post by:
Hi,
I am running a report using Cold Fusion. This report is generated by cfloop tag. Depends on the record count of a query, the report will list the data retrieved from the database. each row in...
|
by: Jody Cliffe |
last post by:
Hi.
Im trying to program my radio buttons to filter data for student pass/fail in a sub form called I have using help found here got this far but its not working and Im not sure why. my radio...
|
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: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
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: 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: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
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...
| |