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 1471
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
Recognized Expert Moderator Expert
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: 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,...
| |
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...
|
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...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
|
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: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |