Filter - Subform _ Query , Multiple Combo Box

Jul 25, 2005

Hello All,

Thank you for taking time to view my access problem, I hope somebody can help / give advice on my problem.

I have a Form, within that form I have a subform. On the main Form I have several Combo Boxes.

ComboBoxes include; Year. Movie. Country.

What I want to do is when the user selects from the various values within each Combo Box to display the data in the subform accordingly.

I was able to use the Wizard to display the Movie Information correctly. The code is below for that. How can I go by doing this.


' Code to change the movie information, when they select the combo box
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[MovieID] = " & Str(Nz(Me![cmbMovieList], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark

I am very sorry if my question seems broad, ill try to be more specific upon request. THANK YOU for your time and your help.

View Replies


ADVERTISEMENT

Filter A Subform Using A Combo Box

Mar 9, 2006

I have a form with a combo box on it.

I want to use the combo box to query a subform.

So basically when you click on the record in the combo box it will filter the subform based on the selection.

Is there is a simple way or do I need to be more specific about the requirements ?

Any help would be greatly appreciated.

Domble

View 2 Replies View Related

Filter Subform Based On Combo Box

Dec 13, 2005

Hello everyone!

I think I am asking the impossible, but can't think why it can't be done!

Here's the dilema:

I am working with an unbound form to search a Mobile Register.

On the form I have an unbound combo box which looks up User details from a table (LKP_User).

When I select a user, I want the subform below to filter all the details for that user and show me which mobiles they have.

PROBLEM:
Combo Box has 3 fields, User_ID, User, Dept_ID. User_ID is bound column but not displayed in combo (only User) is displayed.

I need to link the User_ID with the User_ID on the subform, but don't know how to tell it to look at column 1 of the combo box.

Can anyone point me in the right direction? Do I need some fancy code to get this to work?

Cheers in anticipation
NKA

View 6 Replies View Related

Combo Box To Filter Records In A Subform

Aug 14, 2014

I have a combo box located on one of my forms, that is getting its information from a field in a table.This table has all its records displayed in a subform. I would like the combo box to basically requery the subform to only show records where the name matches what is in the combo box.

It is basically a list of customers, so if I was to select Person1 in the combo box, I would only want to see records for Person1 in the subform.I would also need a way of clearing the search results, in order to get the subform to display all records again.

View 9 Replies View Related

Combo To Filter Subform From Another Subform?

Feb 2, 2015

Main form frmSiteDetails

frmRooms (subform) holds Room information for the rooms on each floor. This form has LinkMasterField [SlaveFloorsID] and LinkChildFields [FloorsID]

frmFloors subform holds floor information for each floor in a property. This form has LinkMaster [SiteID] and LinkChildFields [SiteID]

Both these forms sit on a Tab Control (TabCtl57) and do work properly.

What I would like to do is to also have a Combo to pick a floor number from frmFloors and filter frmRooms. Both these forms have FloorsID fields. This would save a user having to go back to frmFloors to pick a different floor and then go back to frmRooms to view the room data for the new chosen floor.

View 2 Replies View Related

Forms :: How To Apply A Filter On Subform From Combo Box

Jun 17, 2013

I am trying to filter a subform based in a combobox. What im doing wrong, is it the Sintax? This is what i have so far..

Private Sub Buscar_Click ()
Dim strFilter As String
strFilter = Me.CombNomes.Value
Me.subfrmBANCO.Form.Recordsource = "[Nome]=""&strFilter&"""
Me.subfrmBANCO.Requery
End Sub

'subfrmBanco is a subform based on a table called "BANCO"'
'[Nome] is the field in BANCO that im trying to filter on
'CombNomes is the combobox im using as filter parameter

View 10 Replies View Related

Forms :: Filter Subform By Updating Combo Box

Dec 14, 2014

I have a table contains 5/6 column. now i need to filter the table on a form randomly.

Suppose I have 6 different combo box for 6 column. Now on the sub form the control shows the whole table. i this case i have clicked the 3rd combo box, then it will show the whole column in its list. if i select any one of it the table will show the common values below. then i will click the second combobox which will populate the present data shown into the subform table after the first filter.

After that i wish to filter the fifth column where the fifth combobox will populate the data after the second filtering.

By all means the active data into the column will ony populate into the combobox.

View 1 Replies View Related

Forms :: Filter Subform By Combo Box Dates

May 28, 2013

Currently I have a main form w/ subform. In the main form, a user selects a bond's serial number from a combo box and the subform displays the bond's returns for the months owned along with a start date (each month has its own start date). So if I enter bond ABC in combo box, the subform will display "13-01-01, 4%" for January, "13-02-01, 8%% for February..etc.

So if we owned a bond from January to March, it will display the three months' returns. I want to add two combo boxes: begin and end date so that I can filter the subform to only show a particular set of months' returns.

I have three tables right now: Cusips, which lists each bond's serial number, CusipStartPK, which lists the monthly returns for each serial number, and ParameterDates, which is a list of four start dates--ie 13-01-01 for January, 13-02-01 for Feb, etc.

I've tried parameter queries and vba codes from other threads but I can't get this to work.

View 4 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

Modules & VBA :: Multiple Combo Box IF THEN To Filter On NULL

Sep 12, 2013

I have a main form with multiple combo boxes that filter a subform datasheet. In my main form combo box [PR_Filter] I added a selection titled "<Blanks>". When I select "<Blanks>", I want it to filter my subform field [PR] for NULL values. If I select anything else I want it to filter on that selection. I cannot get the NULL filter to work.

Here is the code that I have (Red is the field I need the NULL values):

Private Function PurchaseFilter()
Dim strFilter As String
Dim bFilter As Boolean
bFilter = False
strFilter = ""

[Code] ....

View 14 Replies View Related

OnOpen Form Event Filter A Combo Box In Subform

Jan 18, 2006

On clicking a button to open a form I want to filter a list in a combo Box located on the forms subform

The main form is called 'Frm_orders'
The sub form is called 'sub'
The combo box field is called 'CostCodeID'
and I want to filter column 0 of the combobox which is Tbl_InvoiceCostCodes.Type to show records with a type of 'Repairs'

View 2 Replies View Related

Forms :: Disable Subform Filter If Combo Box Is Empty

Sep 21, 2014

I have a form called frmSearch with an option group called grpSearch ,a combobox called comboNyaba and subform called subform_CasesSearch has a checkbox called CaseClosed

The combobox filter the subform based on option group choice and value in textbox called NyID ... it works fine except that if the combobox is empty it give me error the code in main form i put it on Load and on current

Code:
Private Sub Form_Load()
With Me.subform_CasesSearch.Form
If Me.grpSearch.Value = 1 Then
.Filter = "NyID = " & Me.ComboNyaba

[code]....

View 3 Replies View Related

Forms :: Apply Filter To A Datasheet Subform Using Combo Box

Dec 9, 2013

I am trying to apply a filter to a datasheet subform using a combo box.

This is the code I have used on the "after update" event:

[Ordering - Price list items].Form.Filter = "[Secondary Category]=" & Combo72.Column(1)
[Ordering - Price list items].Form.FilterOn = True

When I run the query i get the following error:

Runtime error 3021:
No current record

I am not sure why it isn't working as this is how I have set up other combo box filters and it worked fine.

View 6 Replies View Related

Queries :: Multiple Combo Boxes To Filter A Listbox

Jul 13, 2015

I have a form where I am trying to use 4 combo boxes(nomenclature,BPN,vendor, and reference) to filter a list box containing part numbers. The way I have it set up right now is in the listbox it is searching for each field and then in the criteria section i have [Forms]![myform]![respectedFieldsCombo].

This works when selections are made from the combo boxes but when one is blank (not being used to filter) then I assume it passes null for that value and the listbox doesn't return anything. I have tried to make it so the listbox ignores null values but im still having this problem.

For example: If i only have a selection for the vendor combo box then i want the list box to show all respective part numbers for that vendor, where nomenclature or any of the other fields are irrelevant. I also want to be able to stack these filters upon every new combo box selection.

View 7 Replies View Related

General :: How To Filter Records Using Multiple Combo Boxes

Jun 29, 2014

I have a table with the following 5 fields. (Service Type), (Valve Name),(Size),(Rating),(Description).

I want to do two thing:

First: I want to select the required information from the first 4 fields using combo boxes and get the last field (description) based on the selected 4 fields. In other words, i want the record to be filtered using first 4 fields to give me the last field info.

Second: I want to store the filtered record (all 5 fields) in another table.

View 6 Replies View Related

Combo Box Filter In Subform Showing Blank At Form Opening

Feb 26, 2015

In the Purchase Order details form a Supplier has to be chosen via a combo box. Based on that another combo box in the subform displays products only from this supplier (Products table is linked to supplier table).

I managed to let the subform combo show only relevant products using criteria referring to the main form combo box. Also other product data will show accordingly in text boxes. So far so good.

However when I close the form and reopen it the subform combo box is blank, other text boxes still show the right values. If I remove the filter criteria for the subform combo then all fields show all data correctly. (However the combo box is unfiltered again 8-/)

So somehow the 'criteria' prevents the combo to show the value that was previously chosen.

View 2 Replies View Related

Forms :: Dynamic Search - Subform Filter With Multiple Text Box

Oct 27, 2013

I wanted to build a dynamic search form using text box instead of the common combo box type.

I found an example that used the combo box and the searching portion of the code is as followed:

Code:
If Nz(Me.txtID, "") > "" Then
If Len(Nz(strFilter)) > 0 Then strFilter = strFilter & " And "
strFilter = strFilter & "CategoryID = '" & Me.txtID & "'"
bFilter = True
End If

How to insert (Like "*" & Me.txtID & "*") into the code to make the dynamic search using text box possible.

View 1 Replies View Related

Forms :: Filter Based On Multiple Selections - Referencing A Control On A Subform

Oct 23, 2013

I have a multi select list box which I am trying to use to open another form and apply a filter based on the user's multiple selections.

List box - lstCatergories
Main Form - frmSuppliersSummaryCategories
Subform on Main Form - frmSuppliersSummaryCategoriesSubForm

The Subform contains the text box CategoryID

Here's my code which nearly works...

Code:
Private Sub cmdFilterSuppliers_Click()
On Error GoTo Err_cmdFilterSuppliers_Click

Dim strWhere As String
Dim ctl As Control
Dim varItem As Variant

[Code] .....

My problem is that the control "CategoryID" is on the subform and I'm having massive problems trying to reference it. This is the part of my code that won't work:

Code:
DoCmd.OpenForm "frmSuppliersSummaryCategories", acNormal, , "CategoryID IN(" & strWhere & ")"

However; if I open the SubForm directly it works perfectly. I.e.

Code:
DoCmd.OpenForm "frmSuppliersSummaryCategoriesSubform", acFormDS, , "CategoryID IN(" & strWhere & ")"

To summarise... How do I reference the control "CategoryID" on the subform "frmSuppliersSummaryCategoriesSubform"?

View 4 Replies View Related

Choosing Subform From Multiple Tables With Combo Box

Sep 6, 2005

Hi guys,

I've run into a little problem while working on a electronics component database:

My plan was to use one specific table for each kind of components, i.e. resistors, capacitors, transistors etc as the specific data of each type is quite different from the other types (resistance/capacitance etc). I also thought I'd use a main form with a drop box allowing the user to choose which component to look for and then a component type specific subform to let the user make a more detailed search.

The thing is that I'm not quite sure how to call different subforms based on the drop box selection (I guess I need a subform for each type of component)? Or can I call a table with each component's specific data types and generate a subform based on this table? (I'd prefer the latter...)

To find a specific resistor you might want to specify the resistance, the type of resistive material, size and tolerance whereas an integrated circuit requires information on type of circuit, package, size etc.

All similar questions I've found relates to the use of a single, main, table only, I can't really see how to do that here...

View 1 Replies View Related

Queries :: Filter Query From Combo Box

Nov 18, 2013

On my database, I have 2 forms. One is to enter data into a Master table, and the other is to specify search terms for a query, and I'm having a problem with the search form.

I've got 2 combo boxes, a tick box and some text boxes which I use to specify criteria for the query. All of the text boxes and the tick box work fine, however the combo boxes are giving me trouble.

I'm using the critera Like "*" & Form![SearchForm]![Combo/Text/Whatever1] & "*" for the text boxes and tick box and this worked fine. However, no matter what way I try to use this, it doesn't work for the combo box. I've tried manipulating the Like function as much as possible, with and without the wildcards, the & signs, everything.

What happens is that either they do not filter out results at all and don't affect the query, or they bring up a blank query if I leave the combo box blank.

View 4 Replies View Related

Query With Multiple Fields To Filter

Jan 11, 2006

I am terrible with databases, but have designed a database that uses two text field types and 48 Yes/No check boxes. The two text fields describe documents (name and location), and all the check boxes indicate what types of documents they are.

What I need to do is to be able to run queries or reports where I can select CERTAIN of the Yes/No field types. For example, some of those check box fields are named 1A, 1B, 1C, 2A, 2B, 3A, 3B, 3C, 3D, 3E, 3F, 3G, (up through 8E) etc.

How can I get the query or report to bring up all of the records that have a check mark in either 1A, 1B, "or" 1C plus list the Field 1 and Field 2 that are text fields? I don't want it to list every record in the database, which is what is happening, because I want to then be able to sort the results.

I know it USED to be in my head how to do this, but I just can't seem to get it to work!

Thanks,

Toni

View 3 Replies View Related

Filter Query By Multiple Fields, One Value

Nov 27, 2007

Quick questions and I'm sure this is easy enough to warrant a quick response:

I have a query.
I have 12 different fields that may or may not have the value "Sabbatical".
I want to view only the records that have the value "Sabbatical" in AT LEAST one of those 12 fields.

Thanks in advance.

View 6 Replies View Related

Query Filter With Multiple Checkboxes

Mar 19, 2008

Hi Folks.

I have a select query that has 10 columns which are checkboxes (yes/no) from the original table. I can apply filters for individual columns but I want the query to show records with ANY of the boxes checked and only omit those with NO boxes checked.

I have spent the whole atfernoon researching the forum but I can't find what I need. Help much apreciated.

Chalkie.

View 1 Replies View Related

Filter Combo Box Query From A Form Field

Feb 21, 2008

If anybody could shine some light it would be much appreciated.
I have 3 tables:
Task table---*Task ID, Task(txt), Start(date/Time), finish(date/Time)
Tasking table---*TaskingID, TaskID, EmployeeID
employee table---*EmployeeID, Name(txt)
The employee and task table are joined to the tasking table. This is so i can have a task which has many employees and an employee with many tasks. What i'm try to do is create a form which starts a task with a subform to add employees, but with combo box which filters employees with tasks which over-lap the task in focus(start and finish fields) but still showing employees which do not yet have any tasks. the start and finish fields are hh:nn dd/mm/yy.
If anybody can help i would be very grateful

Jim

View 3 Replies View Related

Problem Using Combo Box As Query Filter Criteria

Mar 20, 2006

I have a two combo boxes that I want to use to help filter a query. The field the combo boxes need to filter is a numeric field with values that range anywhere from 200 to 1.5 million. To make the filtering easier I set the combo box up to several values (RowSource = Value List) that will serve as a range.

It seems that the query is not recognizing the values selected in the combo box. The numbers appear after being selected, but the query is not affected by the selection. However, When I enter a number NOT on the list (like 428) the query recognizes the value.

How can I get the query to recognize the Value List entries on the combo box?

View 1 Replies View Related

Filter Combo Box Query From A Form Field

Feb 21, 2008

If anybody could shine some light it would be much appreciated.
I have 3 tables:
Task table---*Task ID, Task(txt), Start(date/Time), finish(date/Time)
Tasking table---*TaskingID, TaskID, EmployeeID
employee table---*EmployeeID, Name(txt)
The employee and task table are joined to the tasking table. This is so i can have a task which has many employees and an employee with many tasks. What i'm try to do is create a form which starts a task with a subform to add employees, but with combo box which filters employees with tasks which over-lap the task in focus(start and finish fields) but still showing employees which do not yet have any tasks. the start and finish fields are hh:nn dd/mm/yy.
If anybody can help i would be very grateful

Jim

View 3 Replies View Related







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