473,399 Members | 4,192 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Option Group Filtering - problem

Moe
Hi, this my first post to this group. I am trying to add a option
group of ture/false and all. This is on a form, that the results are
displayed in a subform. When the user select a record from the last
combo box, (I have three combo boxes that filter into the next), and
when the last is selected it shows results in the subform. Now I want
the optiongroup to further filter the data. So far I am not able to
get the option group to work. This is what I have in the afterupdate
of the last combobox. Any help is much appreciated.

Rene
Dim strSQL As String
Select Case grpFilter
Case 1 'yes
strSQL = "=1"

Case 2 'No
strSQL = "=0"

Case 3 'All
strSQL = "IN(-1,0)"

Me.subQryP.Form.Filter = "DugStatus" & strSQL
Me.subQryP.Form.FilterOn = True

End Select

Feb 15 '06 #1
1 2052
Br
Moe wrote:
Hi, this my first post to this group. I am trying to add a option
group of ture/false and all. This is on a form, that the results are
displayed in a subform. When the user select a record from the last
combo box, (I have three combo boxes that filter into the next), and
when the last is selected it shows results in the subform. Now I want
the optiongroup to further filter the data. So far I am not able to
get the option group to work. This is what I have in the afterupdate
of the last combobox. Any help is much appreciated.

Rene
Dim strSQL As String
Select Case grpFilter
Case 1 'yes
strSQL = "=1"

Case 2 'No
strSQL = "=0"

Case 3 'All
strSQL = "IN(-1,0)"
That's redundant. Just leave it blank (ie. strSQL = "")

(unless you are dealing with Null values as well?)
Me.subQryP.Form.Filter = "DugStatus" & strSQL
Me.subQryP.Form.FilterOn = True

End Select


Not sure why it's not working. What happens, if anything, when you use it?
(ie. a better explanation then "it doesn't work" :)

Another way to do it woul be to just change the RowSouce of the form?

eg.

Me.subQryP.Form.RowSource = _
"Select * FROM myTable WHERE [DugStatus] = " & strSQL & ";"

--
regards,

Br@dley
Feb 15 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Edward | last post by:
I have a data entry form that allows the user to navigate around entirely using the keyboard. However, it contains various option button controls which are in the tab order. Whenever they are...
3
by: Stewart | last post by:
Dear comp.lang.javascript, I have more than once wanted to manipulate the contents of select boxes dynamically, whilst the boxes contain <optgroup> tags. Manipulation of a select box containing...
5
by: Richard | last post by:
Hi, I have a form that take some time to load due to many comboboxes and at least 8 subforms. When I filter or sort the main form I get an error message and then Access shuts down. They ask if...
6
by: Robert | last post by:
Hello. I have been trying out the Lebans ToolTip Classes at http://www.lebans.com/tooltip.htm, to display "balloon" style help tips in a form. The classes I am using are located at...
11
by: MLH | last post by:
Why is that? If I choose the tiny check boxes which are hard to hit with a mouse, it works fine. But option buttions, shich can be sized big enough for people with limited sight and dexterity...
1
by: hackerslacker | last post by:
I have an ordering form that use two combo boxes to filter down the records of a Products table. This worked fine with the after_Update of the first filtering the records and creating the...
9
by: Brian Hampson | last post by:
I am trying to determine all the groups which the current user has permissions to add a member. Here's my code: foreach (System.DirectoryServices.SearchResult ADSearchres in...
2
by: jarekz | last post by:
Hello friends. This is my first post here. Please forgive me any mistakes. Could you help me solve the problem that I have in MS Access 2003? I downloaded this template from Microsoft:...
3
by: BarbaraB | last post by:
Is there anyway of returning the value of an option group (in access 2003) back to what it was before any entry was made? I frequenty find people are wishing to remove there answer but with an...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
jinu1996
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.