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 Replies


ADVERTISEMENT

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

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 3 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

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

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

Problems Using A Combo Box To Filter Records In Another Combo Or A Sub-form

Nov 8, 2004

I have seen a few articles here and there on using a combo box to filter records in a sub-form and to filter records in another combo box, but I am not getting anywhere. I hope someone can belp

Exercise 1

For this exercise, I have the following tables:

tblClients containing client names
tblProjects containing some project details

I want to set up a simple form, so that the user can select a client name from a combo box on the main form which filters the project detail records in the Projects sub-form.
Once the user enters project details, I want this info as well as the selected ClientID to be fed back to tblProjects.


Exercise 2

I have the following tables:

tblProjects as above
tblWorkstream containiig names of workstreams and some other details.

Every project has one or more workstreams

I have a form where users will enter hours worked on each workstream. They will first select Project from a combo box on the main form. This should then filter records to be displayed in the Workstream Combo box, before they can then enter hours.



Please let me know if you need me to explain any part of this better.

Thanks in advance.

ps. I am a novice, so I'm hoping to do the above using default MS stuff, not with complex programming!!!

Thanks

View 14 Replies View Related

Forms :: How To Filter Combo 2 From Table After Select Value From Combo 1

Nov 5, 2013

i have a table with three column Named

1-State
2-City
3-Customer

on a form i m placing 3 combo box for each column how can i filter combo 2 from table after select value from combo 1

View 1 Replies View Related

Forms :: Setting Up A Combo Box To Filter Another Combo Box

Jan 27, 2015

I'm having a little difficulty setting up a combo box to filter another combo box. I've actually got one working but the second one is giving me all sorts of errors. On the attached database, there's a form called frmAddNewRecord. At the top of the form there's a combo box which allows you to select a name and another combo box beside it which acts as a filter so only names from a certain section are shown (working fine).

The subform which is attached to this form and contains the training details, has another combo box which allows you to select a job...I've tried to add a combo box beside this to filter it but I can't get it to work.

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

Help With A Subform Filter

Aug 8, 2005

I am relitively new to access but I am learning ;)

I am creating a database that will hold details of hand held scanners that are sent out to various customers. This records the product and serial number etc. I have got the products and supplier tabs that I have specified on the 1st form "end_user" working fine and put in some basic error checking such as locking fields.
The orders form is to show all the orders that were placed by a particular customer, refered to by "end_user_number (autonumber) primary key" and "end_user_description (Text)"
I can now add orders to the database fine and have managed to get the subform to refresh and show details of the newly added order by tagging the requery command onto the end of the save button, so the record gets saved and then the subform refreshed.
The problem: I just cannot figure what I am doing wrong! The subform in order history displays all the orders from all the users where I want to filter the orders that the current end_user_number is related to. I have tried using the child filter and master filter with no luck and am trying to code a VB line to filter instead (currently a temporary command button on the ordershistory subform) but I am not sure of the syntax. Any ideas greatfully recieved!
:)


Code Attached

View 9 Replies View Related

Filter Subform

Aug 22, 2005

How do you filter the subform so that it only returns data regarding the current week ending and no data before this date.

Many thanks,

Andy :confused:

View 1 Replies View Related

Filter On Subform

May 10, 2005

I have a unbound form with a bound datasheet subform on. I want to be able to change the filter on the subform from the main form i.e. on the click of a command button.

The problem I am having is setting the filter on the subform from the main form using VB. The subform does not seem to show up in the forms collection.

Any help would be much appreciated.

Thanks

View 2 Replies View Related

Forms :: Get Subform To Requery After Choosing A Name From Combo Box On Subform Itself

Jul 26, 2013

All I am trying to do is get a subform to requery after choosing a name from a combobox on the subform itself, thus updating the records on the subform. The main form name is "BasicTestOneF" the subform name is "ICminiBasicF" and the combobox name is "Combo4"

I have the combobox requery on After Update, but I still get the "Enter Parameter Value" popup. I've spent the last hour and a half just trying to get this simple thing to work and have gone through I don't know how many sites and forum posts, tried every combination of VBA code I've found, and I still can't get it to work.

View 14 Replies View Related

General :: Subform Combo Box Restricted By Form Combo Box

Mar 28, 2014

I'm an Access newbie and I'm having trouble restricting a combo box on a subform based on the selection of the combo box on the form.The combo box (Combo1) on the main form (FrmOrganisation) gives a list of companies, I want the combo box (Combo2) in the subform (SbFrmEmployees) to list people only from that company. I then have a subform within that subform that displays information about the employee.

View 3 Replies View Related

Combo Box Filter

Apr 23, 2006

Hi All,
Just after a code or way to filter client details via a combo box.
Basically select combox drop down menu select the sales rep then it filters by sales rep and shows only the clients for that sales rep. I can get it to filter but it does the first client of that sales rep but not the rest.

Thanks
Karl

View 4 Replies View Related

Combo Box Filter

Jun 6, 2005

I have two combo boxes, Company Name & Name. The data that is selected is used to run a query from a button. However i would like to set it that if the user (but not required) selects the company name then only the names of the people belonging to that company appear, but if no company is selected then all the names for every company appear.

Can anyone make a suggestion as to the best way to go about this.

Thanks

View 11 Replies View Related

Combo Box And Filter - Please Help

Nov 12, 2004

I've read several threads about one combo filtering a second combo on a form, but can't seem to find a similar enough situation. Can you please advise on the following:

I have a form based on a query containing a whole load of fields from several tables. In particular the query contains a field called WorkstreamID from tblWorkstream.

Each tblWorkstream record has a Workstream ID, Workstream and foreign key called Project ID from tblProjects.

I want my form to have two combos: one for Projects (unbound) which filters the combo for Workstream (bound to the underlying query of the form)

How do I do this?

Please bear in mind, I am not an expert!

Thanks in advance

Sunil

View 14 Replies View Related

Filter Combox On Subform Value From Another

Oct 12, 2005

I ve searched these forums but cant for the life of me find the answer althought there are a lot of posts on combo box filters.

I have MainForm based on tblStaff. I have SubForm based on tblTimesheet.

They are linked by StaffID.

The user selects a Project from ProjectID in the Subform which is filtered to only show Projects assigned to that user. This is done by filtering the combo box by StaffID from the MainForm. Works no problem.

The problem i have is in the next combobox which displays the potential activities for the user. As there are about 80 potential activities i want to filter this based on the Project Role. There are only 5 project roles. I can refer to the project role in either the SubForm query or the ProjectID combobox query but it doesnt work.

I hope this is coherent. Could anyone suggest some code or query parameters for this!?? I'm not an idiot but im beginning to wonder.

Thanks in advance

View 1 Replies View Related







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