473,788 Members | 2,854 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Continuous filtering with a module?

I want to use a set of check boxes to narrow down entries on a subform. I.e.
a check box for black, red & green to describe the colors of a product. So a
use clicks Black and only black products are shown, the click green and only
black and green products are shown. There will be a large number of choices
that a user can make so I'm wondering...

can I right a bit of code or function and put in a seperate module to call
from an after update event of an option group? I"m not real familiar with
using modules or code outside of an objects events.

What I'm thinking is a user clicks the check box for "Black" and the
afterupdate would call function filterResults which could contain code that
would run the list of options, If Black = true then show black products,
else don't show them; if Red = true then...

Does this make sense/ seem like it would be the best way to do it?
Feb 24 '08 #1
2 1622
Kevin wrote:
I want to use a set of check boxes to narrow down entries on a subform. I.e.
a check box for black, red & green to describe the colors of a product. So a
use clicks Black and only black products are shown, the click green and only
black and green products are shown. There will be a large number of choices
that a user can make so I'm wondering...

can I right a bit of code or function and put in a seperate module to call
from an after update event of an option group? I"m not real familiar with
using modules or code outside of an objects events.

What I'm thinking is a user clicks the check box for "Black" and the
afterupdate would call function filterResults which could contain code that
would run the list of options, If Black = true then show black products,
else don't show them; if Red = true then...

Does this make sense/ seem like it would be the best way to do it?

This is an off the cuff idea.

I might make a list of colors as a list of values or derived from a
lookup table. I would then have some columns for the color, products,
models, etc in the main (sub) form. Those columns in the form I'd set
to Enabled/Yes, Locked/Yes. This makes them available to see but not
modifiable.

I'd then create a new form that has a list of colors in a combo, the
products, models, costs, and whatever columns are required in the main
form's display. You could have a field in the form called SelectCancel.
And two command buttons...Selec t and Cancel. In the Select buttons
OnClick event something like
SelectCancel = True
Me.Visible = False
For the Cancel
SelectCancel = False
Me.Visible = False
The color combo in this form

Now in any of those columns in the main form; color, product, etc, put
in the OnDblClick and event to open the form in dialog mode.
Docmd.Openform "ColorProductSe lect",,,,,acDia log
If Forms!ColorProd uctSelect!Selec tCancel then
Me.Color = Forms!ColorProd uctSelect!Color
Me.Product = Forms!ColorProd uctSelect!Produ ct
etc
Endif
'now close the form
Docmd.Close acForm, "ColorProductSe lect"

When the form "ColorProductSe lect" is opened, you can grab data from the
main/sub form. Like
Me.Color = Forms!MainFormN ame!SubformName !Color
Me.Product = Forms!MainFormN ame!SubformName !Product

With this method you use another form to feed information to your main
form...and visa versa. Editting and modifying data is done in
"ColorProductSe lect" and display of data is in the main/sub form.

Lonely Heart
http://www.youtube.com/watch?v=IAY3tupuXyA

Feb 24 '08 #2
After re-reading my post this afternoon, I had trouble understanding what I
was asking so let me try to elaborate & clarify!

My table contains a list of products. Each product is described through a
series of yes/no fields which we will call featureA, featureB, etc. The form
has/will have a check box for each of the yes/no fields, ckFeatureA,
ckFeatureB, etc. and a subform which will contain the list of products. The
user will click a checkbox, say ckFeatureA and I want the subform to show
all products where featureA is true. Then the user will check another box,
say ckFeatureB (ckFeatureA is still checked) and the subform will now show
all products where featureA is true and featureB is true. Now if the user
unchecks ckFeatureA, the subform will show all products where featureB is
true only.

The more I have looked at this issue, I am more unsure of how to procede (or
start really, since I'm just spinning my wheels here). It seems that I
somehow need to write a function that would create a query or filter on the
fly and put it in a module so that I could call it from each of the checkbox
afterUpdate events.
"Kevin" <no**@email.com wrote in message
news:%K******** ************@fe 05.news.easynew s.com...
>I want to use a set of check boxes to narrow down entries on a subform.
I.e. a check box for black, red & green to describe the colors of a
product. So a use clicks Black and only black products are shown, the click
green and only black and green products are shown. There will be a large
number of choices that a user can make so I'm wondering...

can I right a bit of code or function and put in a seperate module to call
from an after update event of an option group? I"m not real familiar with
using modules or code outside of an objects events.

What I'm thinking is a user clicks the check box for "Black" and the
afterupdate would call function filterResults which could contain code
that would run the list of options, If Black = true then show black
products, else don't show them; if Red = true then...

Does this make sense/ seem like it would be the best way to do it?

Feb 25 '08 #3

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

Similar topics

3
10376
by: rquinnan | last post by:
Good Evening all, I would greatly appreciate any assistance on this Access 2003 quandary I'm in. And I do apologize if this has been answered somewhere else, I didn't see one that addressed my problem though. I'm looking to be able to sort multiple fields from a form whose record source is a query of fields from a single table. Background: The default view is "Continuous Forms." and in the Form Header section of the form's design, I...
4
3175
by: Kathy | last post by:
What is the standard technique for handling the fields in the following scenario on a continuous form? Multiple Divisions. Each Division has multiple Buildings. Each Building has a Supervisor. Tables: (abbreviated) TblDivision DivisionID
5
5360
by: Axel | last post by:
An Access 2000 question Hi is is possible to have (as a subform) a continous form with 0..n buttons which have different images in each row. (Personally I would have preferred a button array and assign images in code, much easier with a class module - but unfortunately Access does not support control arrays).
4
3064
by: debbie | last post by:
Well I'm finally trying out class modules...I have a great book I'm using but its ADO and I use DAO so it's a challenge for me...I've looked most of today, in my book and here but can not find an answer. Is it possible to use the class I've created to fill a continuous form? Not finding any information leads me to believe that it can't be done... I have a continuous form that shows all invoices with a balance due...I'm hoping to use the...
6
1655
by: jcrouse | last post by:
I am having problems with a Label_Paint event causing a continuous loop. Here is an explanation of the code. I right click on a label and a context menu pops up. I then select a menu item named "cmLSolidColor". Here is its code:
7
14821
by: | last post by:
Hello, Does anyone have an idea on how I can filter the data in the gridview control that was returned by an sql query? I have a gridview that works fine when I populate it with data. Now I want to look at that data and filter it based on what is in it. I know that this could have been done with data sets and data views in asp.net 1.1 but how is this done now in asp.net 2.0?
5
27595
by: Michael R | last post by:
Searching the net I've found a simple technique to add row numbers and alternate colors (for the even and the uneven row) to a continuous form. 1st step: Create a textbox, send it to background and select the first color. .ControlSouce =fRowNum(False) .Name = RowNum 2nd step: Add the following function to the form module: (for row numbers) Public Function fRowNum(Reset As Boolean) As Long Static I As Integer
6
4872
by: Greg Strong | last post by:
Hello All, Is is possible to use an ADO recordset to populate an unbound continuous Subform? I've done some Googling without much luck, so this maybe impossible, but let me try to explain why. I've been exploring using Access as a front end to both SQL MSDE and Oracle XE. I'm in the process of writing a class to handle the basics of the ADO connection and recordsets. The basic relationships are as follows:
7
1891
by: lrw0831 | last post by:
Hello, I have a few questions. But first I'll give a little bit of info about my database. I'm creating a issue tracker, in a sense. It will be used to enter calls from customers for upgrades, bugs, reports, ect. There is a main form for information to be entered into the database. Then there is also a search and edit form, so if you need to enter addtional information for a specific product, you would search a continuous form and edit...
0
10364
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10172
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7517
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5398
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4069
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 we have to send another system
3
2894
bsmnconsultancy
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.