Help Needed Filtering A Form Using Combo Boxes

Jul 26, 2006

Please help. My inability to achieve this is very frustrating.

I have a tabular form based on a query, which returns a large number of records. I need users to be able to filter the records to display data relating to what they have entered in a number of combo boxes.

For example I have fields showing Product ID, Manufacturer ID, Purchase Order number and due date. Each of these fields has a corresponding unbound combo box where users can select values that appear in the table. I need to be able to filter the form based on what is in these combo boxes. I.e. Filler for a product ID to show all purchase orders numbers and due dates relating to that product ID or filter for a manufacturer ID and due date to show all Product IDs and purchase orders relating to that a manufacturer and date.

Ideally this would be achieved by pressing a command button.

The query, table and combo boxes are all built and work fine but I am unable to get the filter to work, I am using Access 97 and am not very familiar with visual basic. Any help would be appreciated.

Thanks.

View Replies


ADVERTISEMENT

Filtering Combo Boxes Within A Form

Jul 5, 2006

I have a form that we are creating to issue project numbers. We have about 80 different clients. I have set up a combo box for the client name, where we can choose the client from the drop down menu. We want the form to filter according to the client name that you choose. For example, if you pick Lawrence as the client name, the next combo box is the project name and I want it to only show the project names that have been assigned to Lawrence in the past. Can someone please help me on how to do this and if it is even possible at all? Thank you so much for your help!! I have been wrestling with this for about a week and a half now.

View 1 Replies View Related

Modules & VBA :: Filtering Form With Combo Boxes

Sep 19, 2013

I'm attempting to filter my form with combo boxes. I've added the below code, but the if statement that checks if one of the combo boxes is null won't work. If the combo box is null or "", it's supposed to assign a wildcard to the variable. But it doesn't pass the test and goes straight to the Else statement. I've highlighted the if statement that keeps failing in red.

Code:
Private Sub btn_Search_Click()
'create variables to store the combo box values
Dim str_Country As String
Dim str_Vendor As String
Dim str_Survey As String

[Code] ....

View 4 Replies View Related

Filtering Out Items In Combo Boxes

Aug 3, 2006

Need some help here....

I am designing a database to keep track of workers for a haunted house. I have a Roster table, a table of all the nights we are open, a table of Spots in the house, and a table to record who works what nights and what spot they are in. This table has a Room combo box and a Spot combo box. The Room combo has a Row Source of SELECT DISTINCT SpotsAll.Room FROM SpotsAll ORDER BY SpotsAll.Room; The Spot combo is then populated with VB code all the Spots that are in that room. That works fine. This is what I'm trying to accomplish: When a Spot is assigned to a Worker for that night, I want that spot to no longer be available in that list FOR THAT PARTICULAR NIGHT. So, lets say Joe Somebody works in Spot 1 (out of 4 lets say) of the Library Room, when we assign another person to the Library room, I don't want Spot 1 in the Spot list.

Can this be done with a query or VB code? If I'm not making sense, please let me know. I can also upload the Database I am creating so that you can play around with it and see what I mean.

(I have attached a word doc. that shows the table relationships.)


Thanks a lot ahead of time!!
ScrmingWhisprs

View 13 Replies View Related

Combo Boxes Filtering Or Populting Same Records

Jun 8, 2005

Anyone help
I have 2 combo boxes cd group and cd name when I select CD group the records only associated yo that cd name display with that group.

Anyway, also the name of songs form works too,. So then now when I go from record to record the records display right with the songs and not with the cd group and name when I select Mormon Tabernacle Chior and name God Bless Ammerica it disaplys for all the records any help.

Why is it the relationships.

Thanks,

Nike Van der stad
mikevds@optonline.net

View 2 Replies View Related

Modules & VBA :: Filtering Same Field Twice With 2 Combo Boxes?

Feb 4, 2014

I have a sub form that I enter date range in 2 text box's txtstartdate and txtenddate this is filtering field "date raised" and I have combo box call cboclient this is filtering field "client name" this code is behind a command button after hitting the command button it open's the report and it show's all records with in the date range and with client name enter in cboclient works great. problem is I have now added another cboclient2 to filter client name twice so now I enter a date range in txtstartdate and txtenddate put a client name in cboclient and a client name in cbocleint2 hit command button it open's the report but doesn't apply the date range to cboclient2 it just show's all records with that client name

Code:
Private Sub cmdPreview_Click()
'On Error GoTo Err_Handler 'Remove the single quote from start of this line once you have it
Dim strReport As String
Dim strDateField As String
Dim strWhere As String
Dim lngView As Long

[code]...

View 14 Replies View Related

Forms :: Filtering Data Other Than Combo Boxes?

Mar 24, 2014

I am using master/child form for data entry for packings and the details for this packings (i.e. the products inside a packing is entered in subform and packing master is entered in main form ).

In the detail subform i use a productId field which has look up from 1000 products , so i want to filter that particular combo box based on different types from product master ( from which it choses the products).

How many ways are there to filter that combo box based on different types ( which i have in product master as type,design,material etc).One way of which is combo boxes on main form.

[URL]

View 14 Replies View Related

Forms :: Multi Filtering With Combo-boxes?

Jan 1, 2014

I have three comboboxes and I want to have the first one filter the second one and the filtered second one filter the third one.

Filtering the first one on the second one works, but when I whant to add a third one to it, it just shows blank spaces on the third one.

What I did to the first and the second combobox :

1: I pressed the second combobox.
2: Went to rowsource.
3: filled criteria in on the value i whant to connect the first combox to the second combobox ( [Forms]![Thetableimin].[1stcombobox].
4. requery the second combobox in programcode on the first combobox.

What I did to the second and the third combobox:

1: I pressed the third combobox.
2: Went to rowsource.
3: filled criteria in on the value i whant to connect the second combobox to the third combobox ( [Forms]![Thetableimin].[2ndcombobox]
4. requery the third combobox in programcode on the second combobox.

How do I make a third combobox that uses the filtered values of the second combobox to filter the third combobox.

View 7 Replies View Related

Combo Boxes Filtering A Subform - How To Get Them To Filter Each Other

Jul 1, 2014

I thought I was in the home stretch of my project, everything worked great when I was messing with 200 records. Now that I'm messing with 2000+ records, things are very slow. So a search form redesign!

I have a form (frmSearch) that has a subform (frmSubSearch) embedded in it. The frmSubSearch is a datasheet only that is just pulling its info from a query (qrySearch). qrySearch has about 8 columns of data in it.

On the main form I have a combo box that is feeding its list from the qrySearch using a SELECT DISTINCT statement. So a user selects an item in the combo box and my After_Update fires. This sets a filter on frmSubSearch. I have three of these combo boxes that can add to the filter and they work great so far.

But I want to have the combo boxes filter themselves based on whats left on frmSubSearch. So if a user selects something in the 2nd combo box, the sub form filters and updates, but then I want the other two combo boxes to only have valid selections, and not something selectable that would wind up giving me a blank sub form result.

I have tried using .Requery in various ways, but its not working. I have also been looking into the idea of Cascading Comboboxes, but these don't seem to quite fit what I'm trying to do.

View 9 Replies View Related

Forms :: Combo Boxes Filtering Results Into A Subform

May 30, 2013

I have these 3 combo boxes filtering results into a subform.

Code:
Private Sub Combo5_AfterUpdate()
If Len(Nz(Combo5, "")) > 0 Then
FindRFQsubform.Form.Filter = "[RFQ Title] = '" & Combo5 & "'"
FindRFQsubform.Form.FilterOn = True

[code]...

View 1 Replies View Related

Queries :: Filtering Query With Text Box And Combo Boxes

Jul 23, 2015

I am creating a query that should filter records of events based on multiple fields. The filters should work with any combination of field criteria, but only two of the four field are working properly, as follows:

1. a text box for searching with event name (free text) - this is working;
2. a combo box to filter events by country name - this is working;
3. a combo box to filter events by event's keyword (category) - this is NOT working;
4. a combo box to filter events by year - this is NOT working

View 2 Replies View Related

Filtering With 2 Combo Boxes And Then Populating Text/memo Fields

Dec 14, 2004

I have two questions.
I have a form with 2 combo boxes. The first pulls from a simple list. Once you make a choice, the second combo box is then filtered by the first. This works correct, except that once a choice is made in the first, the filter is locked. If you change the first combo box's value a second time it does not effect the second box. The query that I am using for the second combo box has two columns that pull the first 50 characters of a pair of memo fields. Quote: SELECT MSSS.SS_ID, Left([Application_Name],50) AS Expr1, Left([Description],50) AS Expr2, MSSS.Site_Code
FROM MSSS
WHERE (((MSSS.Site_Code)=[Forms]![Edit or Delete Requests]![Combo6])); These fields are then used to populate 2 text fields using an event procedure. Quote: Private Sub Combo10_AfterUpdate()
' Display Partial Application Name and Description based on choice
Me!txtApplication_Name = Me!Combo10.Column(1)
Me!txtDescription = Me!Combo10.Column(2)
End Sub This is working fine, but it starts the next problem.

I need to change the form to include the entire memo field into a text box. I was using the columns of the second combo box to fill them in. Since the combo box is limited to only 50 characters, i could only grab part of it. I am guessing there is a much better way to accomplish what I need, but I am too inexperienced with forms and vb to come up with it. Below are the fields I need from table MSSS
Business_Name
Application_Name
Description
Acronym
Level_1_Support
Level_2_Support
Escalation_process
Troubleshooting
Priority
Links
Modified
Disabled

Thanks in advance to any help!

View 5 Replies View Related

Modules & VBA :: Form Filtering On Opening Certain Text Boxes

Dec 5, 2013

i have a calender of which show's records on date box's i m having a issue when i double click on a datebox it opens a form call update which is filtered on open to show only records for this date but on date boxs on 1st to the 11th i have add the code to do this but when the form open's the form is blank and shows no records but the code works fine for 12th to 31st which i can't understand why? as im using the same code that does dateboxs 12th to 31st on datebox 1st to 11th but doesnt work i'm pulling my hair out on this one !!

View 3 Replies View Related

Forms :: Filtering A Combo Box On A Subform From A Combo Box On A Main Form

Apr 27, 2013

I have a Suppliers database which contains a form that will allow me to place orders with Suppliers.The Main form has a combo box that allows me to select the supplier. The combo box is called SupplierID with the following:

Row source: SELECT Suppliers.SupplierID, Suppliers.CompanyName FROM Suppliers ORDER BY Suppliers.CompanyName;

The subform is called Stock Subform witha combo box called ProductID with the following:

Row source: SELECT DISTINCT Products.ProductID, Products.ProductName, Suppliers.CompanyName, Products.Discontinued FROM Suppliers INNER JOIN Products ON Suppliers.SupplierID=Products.SupplierID WHERE (((Products.Discontinued)=0)) ORDER BY Products.ProductName;
Event Procedure - AfterUpdate: Private Sub ProductID_AfterUpdate()
On Error GoTo Err_ProductID_AfterUpdate
Dim strFilter As String
' Evaluate filter before it's passed to DLookup function.
strFilter = "ProductID = " & Me!ProductID

[code]..

The Link fields are done on the Purchase Order ID (PONoID).What I want to achieve is to select the supplier from the combo box (SupplierID) on the main form and then the combo box (ProductID) on the subform to filter to only show products directly supplied by the Supplier selected on the Main Form.

View 11 Replies View Related

Filtering Combo Box Based On A Value From Another Combo Box (in Multiple Items Form)

Mar 11, 2012

Let's assume we have 3 tables:

Order_Category (Order_Category_ID, Order_Type_Name) with 2 records:
1, Minor
2, Major

Order_Type (Order_Category_ID, Order_Type) with 4 records:
1, Book
1, Pencil
2, Car
2, House

Orders (Order_Category_ID, Order_Type, value) with 2 records:
1, NULL, NULL
1, NULL, NULL
2, NULL, NULL

I want to create a Multiple Items form presenting Orders table with two Combo Boxes:

1. A combo box to select Order_Category_ID.
2. A combo box to select Order_Type. When 1 (Minor) is chosen in the first combo box it should show Book and Pencil, when 2 (Major) is chosen it should show Car and House.

Examples in the Internet show how to do it on a 'single row' forms using the RowSource property. I tried to use a query like:

SELECT Order_Type
FROM Order_Type
INNER JOIN Orders ON Order_Type.Order_Category_ID = Orders.Order_Category_ID
WHERE Order_Category_ID = [comboBoxOrderCategoryID]

But it sets same values for all records in the Multiple Items form and it should return different values in each rows based on value in the first combo box (Order_Category_ID).

View 5 Replies View Related

Queries :: Multiple Combo Boxes And Text Boxes On A Search Form

Mar 24, 2014

I'm trying to build an database for aircraft operators. I've got the basic tables structure and relationships but I'm stuck on building an search form to filter records by user input.I've got following controls on my form (unbound):

1. AircraftType (combo box) from tblAircrafts
2. CompanyName (combo box) from tblListOfAircraftsOperators
3. TeailNumber (text box) from tblAircraftOperators
4. AirportNameSearch (combo box) from tblAirports
5. PassengersNumber (text box) from tblAircraftOperators
6. ManufactureYear (text box) from tblAircraftOperators
7. SourceSearch (combo box) from tblInfoSource
8. CountrySearch (combo box) from tblCountry
9. CategorySearch (combo box) from tblAircraftCategory
10. EamilToOperator (text box) from tblAircraftOperators
11. InteriorPhoto (Bound object frame) from tblAircraftOperators
12. ExteriorPhot (bound object frame) from AircraftOperators

I need to enable users to search for aircrafts based on those criteria. As I mentioned I'm new to Access and I don't have any advanced coding skills. I have a query build to perform the search and this is the code I've managed to write so far:

SELECT AircraftOperators.RegistrationNumber, AircraftOperators.PassengersNumber, AircraftOperators.ManufactureYear, AircraftOperators.EmailToOperator, AircraftOperators.ExteriorPhoto, AircraftOperators.InteriorPhoto, tblListOfAircraftOperators.OpratorName, tblAircrafts.AircraftType
FROM tblAircrafts INNER JOIN (tblAirports INNER JOIN (AircraftOperators INNER JOIN tblListOfAircraftOperators ON AircraftOperators.CompanyName =

[code]....

View 2 Replies View Related

Queries :: Query By Form With Check Boxes / Combo Boxes Not Working

Mar 25, 2013

Attached I have a database that I've been working on which has a form called "frmCriteriaSearch". It is based off of the qryCriteriaListBoxUpdate query. I am trying to get the listbox in the second tab of the results section to work. It queries fine for the checkboxes, but I cannot get the comboboxes to affect the query (unless a checkbox has already been selected)

View 6 Replies View Related

Forms :: Search Form Using Both Combo Boxes And Check Boxes

Jun 5, 2014

I am trying to make a search option in my form header. Right now I have two unbound combo boxes (CboAccountsfilter and cboCourseName) that I can use to filter my records. Currently, I can use the drop down for CboAccountsfilter and a list of accounts will appear. When I select one, the corresponding Course Names will appear in cboCourseName. This works fine...Code below. I would like to take the filtering a step farther and add checkboxes to filter the data. I my form, there currently exist several check boxes (yes/no)...(Priority, Rep Top Target, Manager Top Target, ect). I would like to have the option to use a check box to filter. I.E if I had a checkbox in my header called PriorityFilter, if checked it would only bring up those records that met the two combo boxes criteria and was a priority.

Below is the code I have so far...it doesnt have anything for the checkbox because I am at a lost of how to get started.

Private Sub CboAccountsfilter_Change()
Me.Requery
Me.cboCourseName.Requery
Me.Check178.Requery
End Sub

[code]...

View 1 Replies View Related

Forms :: Filtering A Combo Box On A Form

Jan 21, 2014

Im having trouble filtering a combobox on a form. I have two Comboboxes, one is called (FleaTickWorming) depending on what is elected in this cobo, will deside on what is available in the other combo which is called (Product). The form is a continuous form. The filtering works, in as far as it changes the list each time, but it also deletes the item that I have chosen on previous records if the list is different. My code is as follows:

Code:
Private Sub FleaTickWorming_BeforeUpdate(Cancel As Integer)
If Me.FleaTickWorming.Column(0) = 1 Then
Me.Product.RowSource = "qry_FleaProducts"
ElseIf Me.FleaTickWorming.Column(0) = 2 Then

[code]....

View 3 Replies View Related

Clients Table Help Needed, Filtering

Jan 7, 2006

Hi, based on previous advice I had merged my customers and owners into one table and selected whether a client was a customer, owner or both via a lookup table.

This is working fine, however I must assign a rep to each owner, I'm not quite sure how to do this, I need to be able to assign a rep to an owner in the clients table, I must also make sure than a rep can not be assigned to someone who is just a customer obviously.

I have attached the database (http://jonroberts.redirectme.net/database.zip), hopefully that will make things more clear.

Thanks in advance.

View 2 Replies View Related

More Than Two Combo Boxes In A Form

Jan 28, 2005

Hello to everyone!

I have a serious issue to solve and I would like to ask for your help, as I just don't seem to know how and where to start from.

I need to make a database that will have 2 tables, say tbl_item and tbl_offer. The items table will have different cardboard dimensions and other characteristics (width, height, color, photo, price etc) while the tbl_offer will have different combinations of clients' cardboard requests.

The workflow is:

A client comes and asks for:

- two pieces of cardboard of 120x100 cm
- five pieces of cardboard of 135x90 cm
- one piece of cardboard of 110x125 cm

I want to be able to enter the client's request in a form and the form will do 2 things:

1. Store the clients request as a record in the table tbl_offer (for current or future referrence)
2. Create a report (out of the above record) that will be printed out and given to the client (but I suppose that's easy...)

Now tbl_item has different types of cardboard (their code names) along with different dimensions and price for each, for example:

Type|Width|Height|Price
----------------------------
001 | 120 | 100 | 10
001 | 135 | 190 | 12
001 | 110 | 125 | 11
001 | 110 | 100 | 16
001 | 150 | 100 | 12
002 | 165 | 170 | 17
002 | 140 | 105 | 10
002 | 140 | 130 | 18
002 | 170 | 130 | 18


The problems are

1. I don't know exactly how I can create a form (say frm_offer) that will give me the possibility to add many different cardboard types and save them as one offer to the tbl_offer. What I would like is to choose from a combobox (or any other similar function) the type (say 002) and by this selection a second combobox would be filled only with the available Width dimensions for this type (165, 140, 170). By choosing what I want from the width combobox, a third combobox would be available that would give me the available height dimensions for this width (if for example I chose Type 002 and Width 140, the last combobox would give me two choices, 105 and 130). After choosing the Height I want, I would fill in a text box of how many pieces the client wants and the form would also fill automatically the cost of all the pieces for that dimension (by taking the price/item from the tbl_item perhaps?). If 1 piece then it should say i.e. 18 for the 140x130 piece, if 10 pieces it should say 180. Finally, I want to add the photo of the cardboard automatically (pls note that same type of cardboards share the same photo) not at the form but at the report to be printed.

I have already looked in the Access FAQs section of the forum for the combobox techniques but I can't understand how I can apply them to three (or more) comboboxes plus the photo.

I can use Access only when little/no programming is required, and I am very much afraid that all the above will require a great deal of it, so I apologise in advance for my non-knowledge of programming :(

2. How do you think would be suitable to split all this data to tables? Is my thinking correct (2 tables, tbl_item and tbl_offer) or would you suggest something better? Will the tbl_offer get a lot of data that way? Mind you also that every once a year there is the need of updating the cardboards' prices (all will rise/fall at the same percentage) and, furthermore, we are talking for about approx. 100 different types of cardboards, each with about 15 different dimension combinations.

I am not sure if I had to post this message to the Tables section of the forum or here but I think here is better as the main problem is the form part.


Thank you all in advance and my apologies once again for the low level of my programming skills :(


Alexander

View 5 Replies View Related

Filtering - By Option Boxes Multiple

Sep 8, 2004

I am trying to design a form which will provide my users multiple reporting options using the same query.

my query contains the following fields:

Daycode
WeekNumber
PeriodNumber
Line
Machine
Eventcode
TotalTime
Occur
Avg

i want the user to choose in this order :

a time period to run the report.....either Daycode, WeekNumber,PeriodNumber

then select:

a Line,

then select either Totaltime, Occur or Avg (this will require to be sorted Desecnding..

then finally to decide wheter to have all the data remaining, or sorted by machine.

DB is here--------> Click here

View 4 Replies View Related

Multiple Combo Boxes On Same Form

Apr 16, 2005

I need a form that has multiple categories, 7, listed one after another vertically. I also need the categories divided in to 2 columns.
I need to have 2 combo boxes, 1 each controlling the info for each column.
Can I do this on 1 form. Suggestions would be appreciated.

Freddie

View 6 Replies View Related

Cont Form With Combo Boxes

Oct 24, 2005

I have a continous form that once the combo box filters are selected, shows the applicable records. Included in records, I've put a bound combo box that allows the user to fill in that particular field. This works with the first record but when you attempt to select the other records, all the combo boxes disappear. What am I doing wrong here??

View 12 Replies View Related

Multiple Combo Boxes On The Form

Jul 17, 2006

Hi,

I need help in the following 2 problems:

I have two combo boxes on the form and print button.
In one combo box showing numbers 1,2,3,4 and 5.
Other combo box showing logical operator =,<,>
User is going to select from one combo box logical operator and from other number "means class field".
Print button prints the report. Report is based on the query.
In the query in criteria line I put the code
[FORMS]![MAINFORM]![CMB_CLASS]
It works for one combo box. Problem is to get criteria from second combo box or concatenate the both criteria’s. In query criteria line it should show like <2 or =3 or what ever user is selecting.

Second problem is in the same line. Three text boxes and 2 combo boxes showing "OR" and "AND" For example in one text box user enters last_name and then he select "OR", second text box enter city and then he select "AND" from second combo box and third text box enter department. After selection he is going to click the print button to print the report.

I really appreciate if anyone knows the solution or they used this type of thing in there application.

Thanks

View 2 Replies View Related

Autofill From Many Combo Boxes In One Form

Sep 14, 2006

Hi all! :D
I'm trying to make a form to autofill with customer data (from a database), with 4 columns (= 4 customers). Each column contains on top a combo box and below 5 text boxes with address, phone etc.
So i created a form and placed a combo-box (from wizard) with the option "Find a record on my form based on the value i selected in my combo box".
The problem is that this one combo box controls all the text boxes. Even if i create an other one, it still controls all of them.

So i'd like to ask: How can i link a combo box, to autofill specific textboxes?:confused:

Thanks... :)

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved