Hi,
I need to create a filter form that gives a user flexibility in selection any fields in a table and in filtering records based on conditions, such as range. I've read some about a multi-select list box, but it does not give flexibility of choosing any fields. Can anybody help me on this and tell me what subject I should read? Many thanks in advance!
[I am using Access 2000 (Window XP) and ODBC connection to MySQL server table]
12 1546 sierra7 446
Recognized Expert Contributor
Hi
If you are using Access have you tried the "Filter By Form" technique.
I personaly don't like it because users can filter for anything..... then not understand the results, or not be able to revert to normal form, or call for support...
However, if used intelligently it allows you to filter on multiple fields, I think including ranges with the correct syntax, without coding!
S7
Hi
If you are using Access have you tried the "Filter By Form" technique.
I personaly don't like it because users can filter for anything..... then not understand the results, or not be able to revert to normal form, or call for support...
However, if used intelligently it allows you to filter on multiple fields, I think including ranges with the correct syntax, without coding!
S7
Thanks for you reply, Sierra7!
In order to revert to normal form have you tried to use "Remove Filter/Sort"?
Anyway, I will look into more as you suggested and will get back. Thanks again!
Thanks for you reply, Sierra7!
In order to revert to normal form have you tried to use "Remove Filter/Sort"?
Anyway, I will look into more as you suggested and will get back. Thanks again!
The problem is that I need to create a filter form that executing the select query with information entered by a user in 'WHERE' clause. That's what I meant 'flexibility'. For example,
SELECT a, b, c, d, FROM mydb WHERE xx = yy
xx and yy will be entered by a user. Can anybody help on how I should approach? Thanks!
sierra7 446
Recognized Expert Contributor
Hi
Yeh, 'I' have no problem removing the filter etc but the problem I have found with some users was that they did not realise their data had been filtered, then tried browsing for something else. Anyway, that's not your problem.
Sorry to be dim but I'm a bit confused about what you mean by a 'Filter Form'
Are you suggesting that the users will enter parameters in your form to ;- - Display matching data in the current form ?
- Set criteria for opening another form or report ?
- Create an SQL string for some other purpose to use elsewhere?
Or to put to another way, when you execute your query where will the results display?
Should the users select a, b, c & d all the time or sometimes just a, b & c? (incidentally I would drop the last comma in your string or it won't work) and the WHERE can be also be on a, b, c or d ?
S7
Hi
Yeh, 'I' have no problem removing the filter etc but the problem I have found with some users was that they did not realise their data had been filtered, then tried browsing for something else. Anyway, that's not your problem.
Sorry to be dim but I'm a bit confused about what you mean by a 'Filter Form'
Are you suggesting that the users will enter parameters in your form to ;-- Display matching data in the current form ?
- Set criteria for opening another form or report ?
- Create an SQL string for some other purpose to use elsewhere?
Or to put to another way, when you execute your query where will the results display?
Should the users select a, b, c & d all the time or sometimes just a, b & c? (incidentally I would drop the last comma in your string or it won't work) and the WHERE can be also be on a, b, c or d ?
S7
Hi, Sierra7!
Yes, the SELECT statement shoould be the same because that's what we want to filter, but WHERE should be any column heading in the table.
We want to see a, b, c, d all the time, where the condition is changed every time. In other words we want to filter a, b, c, d by other column heading, e.g., spanish=1 and county="LA", something like this, for data analyzing purpose.
The WHERE part has to be flexible that a user can select any column heading in the table as necessary. So my question falls into 1. Thanks!
sierra7 446
Recognized Expert Contributor
Hi again Loisk
From your last posting I have picked up; - The WHERE can be any column heading in the table
- Display data in current form (I presume every field (column) is shown)
Thanks for clearing the confusion because some people refer to a Filter Form as a 'dialogue' form that sets conditions for opening a Report or another form.
What you seem to want to do is set a filter on the current form but because of the flexibility you say you need then I go back to my original suggestion of using 'Filter By Form'.
Incase we are crossing purposes again, this is initiated by clicking on the small icon with a filter-funnel and a square 'form' in the background. If you are using the default menus/toolbars it is the one beside the 'funnel with a lightning bolt' in the top menu, or can also be brought up by right clicking in the centre of the form.
Oh! It has just occurred to me that you might be using UNBOUND forms with MySQL, (in which case the Access Filter By Form will not work!) so I had better stop here until you let me know.
However, I will add this reference Example Filtering on a Form
I wait until you advise you are using Bound or Unbound forms
S7
Hi again Loisk
From your last posting I have picked up;- The WHERE can be any column heading in the table
- Display data in current form (I presume every field (column) is shown)
Thanks for clearing the confusion because some people refer to a Filter Form as a 'dialogue' form that sets conditions for opening a Report or another form.
What you seem to want to do is set a filter on the current form but because of the flexibility you say you need then I go back to my original suggestion of using 'Filter By Form'.
Incase we are crossing purposes again, this is initiated by clicking on the small icon with a filter-funnel and a square 'form' in the background. If you are using the default menus/toolbars it is the one beside the 'funnel with a lightning bolt' in the top menu, or can also be brought up by right clicking in the centre of the form.
Oh! It has just occurred to me that you might be using UNBOUND forms with MySQL, (in which case the Access Filter By Form will not work!) so I had better stop here until you let me know.
However, I will add this reference Example Filtering on a Form
I wait until you advise you are using Bound or Unbound forms
S7
Hi,
I am using Bound form connected to MySQL table via ODBC.
Thank you so much, sierra7!
sierra7 446
Recognized Expert Contributor
Hi,
I am using Bound form connected to MySQL table via ODBC.
Thank you so much, sierra7!
That's good! The reason that I am banging on about Filter By Form is that you said you wanted flexibility; to filter on any field; to state ranges and I think you hinted about multi-select (By which I mean not just filter by "Florida" but "Florida and New Mexico")
And I believe you can do all this using Filter By Form withou writing a line of code!
You users will have to learn certain rules of syntax for > , < , BETWEEN, LIKE and IN etc
If you read the topic in Help it should be self explanatory but let's see if this is what you want first.
S7
That's good! The reason that I am banging on about Filter By Form is that you said you wanted flexibility; to filter on any field; to state ranges and I think you hinted about multi-select (By which I mean not just filter by "Florida" but "Florida and New Mexico")
And I believe you can do all this using Filter By Form withou writing a line of code!
You users will have to learn certain rules of syntax for > , < , BETWEEN, LIKE and IN etc
If you read the topic in Help it should be self explanatory but let's see if this is what you want first.
S7
Thanks for your prompt reply!
I did read about Multi-select listbox or so, but it's still not what I am looking for.
I need to be able to select not just by value in a column, but should be able to select any column heading at filtering. I am not sure how I put it in better way in explanation. Multi-select box is flexible in selecting multi values in a column. To reiterate, in WHERE clause, for instance, in where column=value this column should be chosen by a user at the time a user filters.
I hope I am not making you irritated by my being inefficient in describing the problem.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Rizyak |
last post by:
This message is cross posted in
alt.comp.lang.php & comp.lang.javascript
I have a form for a user to input an establishment's hours and what time an
event is taking place. After the user inputs their establishment's hours of
operation I want the form elements lower in the form to adjust so that an
event can only happen when the place is open.
I have two fields for the hours:
These are both select fields with values between 0-23
|
by: jkmambo |
last post by:
Suppose I have two tables A and B
Table A has fields A1, A2, A3, ... A9
Table B has fields B1, B2, B3, ... B9
I want to select all fields in A and only B3 in table B. I dont want to
list individual fields for A because they are too many I simply want to
use a *.
How do I do this?
|
by: Elias Farah |
last post by:
Hello All,
I hope someone can give me (and other keen access enthusiasts) some
helpful information to explain how to most efficiently filter Queries
& subqueies.
Consider this common simple situation:
1. OrderTable
OrderID - Indexed (PK)
|
by: Ramesh |
last post by:
hi,
I am selecting fields from three table for manupulating
data and i want to display total number of records
selected. But i am always getting -1 value, eventhough
1000 of records are selected. Below is my code. here
strSelectSQL value is
strSelectSQL = "Select emp.Empno, emp.FirstName,
emp.LastName, emp.DB,
emp.DOJ,emp.Grade,emp.yearofexperience,
|
by: Patrick |
last post by:
I'm working on a contact management application, and need a hand with one
aspect...
Here's what I want to create:
------------------------------------
A form split into two parts. There is a datagrid on the left side that lists
names and perhaps a couple of other key fields. The user can click on a
record in the datagrid, which should automatically pull up details on that
record in the various text boxes and other controls on the right...
| |
by: JDiamond |
last post by:
Hi,
I have a table called Hosts. The Hosts table contains the following
fields:
Each field represents a step in the project. The tech that completes
each step initials the respective columns using a combo box within a
form. These initials are stored in an engineer table in which the combo
|
by: Gordon Youd |
last post by:
Hi, the group helped me with my last post "Select query from query1 or
query2".
How do I show " JourneyBookingFormQuery.Req ArrTime" on the "Out column in
sortkey" but not in "In column in sortkey" ?
SELECT JourneyBookingFormQuery.ID, JourneyBookingFormQuery.Prefix,
JourneyBookingFormQuery.Surname, JourneyBookingFormQuery.Town,
JourneyBookingFormQuery.Req ArrTime,
JourneyBookingFormQuery.InwardArrivalTime, IIf(=,'Out','In') AS sortkey
|
by: NeoPa |
last post by:
CHAPTER 1 - TABLE OF CONTENTS (Including attached database)
CHAPTER 2 - INTRODUCTION
CHAPTER 3 - TABLE LAYOUT
CHAPTER 4 - FORM LAYOUT
CHAPTER 5 - FORM MODULE
CHAPTER 6 - CODE DISCUSSION (FILTER CONTROLS)
CHAPTER 7 - CODE DISCUSSION (THE REST)
--------------------------------------------------------------------------------
|
by: NeoPa |
last post by:
Cascaded Form Filtering
CHAPTER 1 - TABLE OF CONTENTS (Including attached database)
CHAPTER 2 - INTRODUCTION
CHAPTER 3 - TABLE LAYOUT
CHAPTER 4 - FORM LAYOUT
CHAPTER 5 - FORM MODULE
CHAPTER 6 - CODE DISCUSSION (FILTER CONTROLS)
CHAPTER 7 - CODE DISCUSSION (THE REST)
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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...
| |
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...
|
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,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |