Forms :: Filtering A Drop Down In A Subform?

Jul 29, 2014

The main form has fields for Record ID, Position, and Revision. The subform has fields for ID, Position, and Revision. There is also a field for "task". I have over 15 positions and 495 tasks. Each position has a set number (around 15 or so) tasks associated with that position.

I have the Position in the main form and the subform linked so when I select a position on the main form, the subform loads the same position. The question field (drop down) is "fed" from a query which contains all positions and all tasks. What I want the subform to do is when I select a position the drop down ONLY displays the tasks associated with that position.

I tried using an event procedure "On Click" and "After Update" to no avail. The embedded macro was:

Apply Filter Where condition= [tbl_Detail Cost Information]![Position]=[qry_attempt 1]![Position].

I also tried the reverse Where condition =[qry_attempt 1]![Position]=[tbl_Detail Cost Information]![Position]

The result is a fully loaded (all tasks) drop down.

View Replies


ADVERTISEMENT

Drop Box Filtering

Jan 6, 2006

Hello Everyone. I'm not all that new to access however my problem does exceed my experience and I'm hopeing someone out there maybe able to help me.

A while back I began to build a database to keep track of post production activites such as what items were being produced on a perticular production line. Its my job to book all these items in according to date, line, item, order and qty.

This was all good and simple until it was decided that I had to assign a category to each item. Their are multiple models to one perticular category and to make things even more difficult the same item could be produced on more than one production line.

I work within a Pool company where their are 7 production lines, each with their own purpose and facilites of making certain products until you come to other products that could be produced on any of 3 or more lines.

So, I made a table 'Category' which lists the different types/acronyms for products and the lines in which it could be produced on.
I than created a new column within my Post Production table called 'category' and chose to use a drop box so I may select which category to assign the item. The drop box shows both columns 'Catefory','Line'.

The problem I have is that theres 40+ rows within the Category drop box and because the same name of the category may appear more than once simply beginning to type in the category name isn't good enough.

Is there a way to filter out which categories is listed within the drop box according to which line it maybe coming off once I've already selected which line within the same row?

I've tried selecting a relationship and createing a query both failed.

WarrenG.

View 5 Replies View Related

Forms :: Display Subform As Datasheet And Allow Filtering

Feb 9, 2015

I am using Access 2010. I have a subform(continuous form) that I display as a datasheet and allow filtering. I display the record count by using Me.Recordset.RecordCount in the subform's form_current event. This value updates properly based on the column filtering except when the filtering displays 0 records.

When there are 0 records, the form_current event does not fire and I cannot figure out how to trap when this occurs so that I can display '0 records found'. How I can tell when the column filtering causes 0 records to display in the datasheet? Is there an event that fires when the user filters using the column headings arrow?

View 5 Replies View Related

Forms :: Access 2010 Subform Filtering

Nov 5, 2014

I have not used access since Office 97 so, I see many changes. A while back I used Access to create some minor tracking databases. Now, with 2010 I'd like to modify the database that I am currently using. I have a main form that tracks daily trips or tasking(s). Within the form are two sub forms that track:

1. People assigned to the trip through a combo box; and
2. Itinerary for this trip.

I have been asked to add a Trip justification(s) through a combo box which will have several selections avail that can be chosen and would apply to each trip. These can be added to by double clicking the justification (figured that one out). What I would like the sub form to do for each new trip that is entered is to display only these values as a single selection rather than 12 times (example) if there are 12 trips that have the reason justification as part of the trip/tasking.

I just can't seem to make this work. The personnel one and itinerary one work just fine (previously existing). I just can't seem to get the new one to work. I have checked that the new table is connected through the relationships. In the exact same manner. The new form has the ID (Key) OPID (to link each trip separately) and justification text field.

View 6 Replies View Related

Forms :: Filtering Subform With Toggle Buttons

Sep 25, 2014

I have a tab control at the bottom of my main form, and some of the tab pages contain subforms. On one of the subforms I have created a filter to divide the content into "complete" and "incomplete." I have also added a toggle button option group to the subform to toggle the filter (one button for "complete" and one for "incomplete"). I'm using a macro to apply the filter, but it isn't working. The filter does work properly if I use the "Toggle Filter" button on the Ribbon, but I want to create something a little more user friendly.

I have :

Main form: Search_by_name
Subform: Action_Items
Underlying table: tbl_Action_Items
Subform control: sfctlActionItems
Toggle button option group: tgl_Complete_Incomplete

Here's the macro as it stands right now:

If [tgl_Complete_Incomplete]=-1 Then
ApplyFilter
Filter Name
Where Condition =(([tbl_Action_Items].[Completed])=True)
Control Name [Forms]![Search_by_name]![sfctlActionItems].[Form]![tgl_Complete_Incomplete]
Else
RunMenuCommand
Command RemoveFilterSort
End If

I get the error message "The 'ApplyFilter' action requires a valid control name that corresponds to a subform or subreport."

If I remove the content of the Control Name field and open the subform independently (i.e. not as a subform), everything works fine.

View 6 Replies View Related

Forms :: Drop Down To Populate Data To Subform

Dec 15, 2013

I have:

Tables: Customer and Orders

Relationship: Customer ID is the primary key in Customer and is a foreign key in order table.

I need to create a Form with contains all the customer info from the customer table, as a drop down list. Once the customer is selected, all their orders should appear in a subform. At the minute I can get a form to work which shows all the orders but you have to go to the next record so see the order. For example it will say John smith and one order. The next record will be John smith again and their second order in the sub from.

I have used access in the past and I am fine with creating everything apart from the drop down. I am just a bit lost with the structure.

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

Forms :: Filtering A Subform On Tab Control From A Separate Form

Sep 11, 2013

I am trying to filter a subform on a tab control based on an input on a second form.

Mainform: frm Index Page 2
Tab Control on Mainform: tabctrlMain
Subform: Customer Details
Tab Name: tabCustomerDetails

The second form is basically a separate Search Form where users can look for a customer ID and returns the ID back to Customer Details form.So far I have managed to redirect focus to the correct tab on the tab control using the following code:

DoCmd.OpenForm "frm Index Page 2"
With Forms("frm Index Page 2")
!tabctrlMain.Value = !tabCustomerDetails.PageIndex
End With

However, I am stuck with the filtering part. Everything was working fine before I began putting the forms together into one big tab control (I tried using Navigation Pane but there were too many referencing problems so I gave up on that one).

View 2 Replies View Related

Forms :: While Filtering Main Form Subform Also Gets Filtered

May 6, 2013

I have faced with a problem while i was filtering my main form.....my problem is when i filter the main or parent form the related sub-form also gets filtered how to manage the main form so that when i filter it the sub-form should not be filtered so that i can get the related record to my filtered one in the sub-form... as for the time being when i filter the main form the related record in the sub-form is not shown and when i press unfiltered on the sub-form its data gets appeared....

View 11 Replies View Related

Forms :: Filtering Pivot Chart Subform By Parameter Without VBA

Jun 28, 2013

I have a pivotchart subform who's Filter Property I've set to:

Code:
[EEIC_ID] In ([Forms]![MainDataControl].[EEICBuffer],0) And
IIf([Forms]![MainDataControl].[TypeIDBuffer]="",[AG_TYPE_ID] Like "*",[AG_TYPE_ID] In ([Forms]![MainDataControl].[TypeIDBuffer],"")) And
IIf([Forms]![MainDataControl].[AgencyBuffer]="",[AGENCY_ID] Like "*",[AGENCY_ID] In ([Forms]![MainDataControl].[AgencyBuffer],"")) And
IIf([Forms]![MainDataControl].[FacilityBuffer]="",[FACILITY_ID] Like "*",[FACILITY_ID] In ([Forms]![MainDataControl].[FacilityBuffer],""))

The issue is that none of the parameters are recognizing the textbox controls even though the references appear to be correct. Per access.mvps.org/ access/forms/frm0031.htm, I've attempted several versions of the syntax.

I believe that I've done this successfully in several other forms, though none have been been via a pivotchart. What's more, this exact same filter string worked when the pivotchart was its own popup and the referenced form was a separate window. Once I embedded it (being the pivotchart) as a subform, however, I began to be presented with the "Enter Parameter Value" dialog, even though the control's address had not changed. Note: the form with the embedded pivotchart is separate from the control's parent form.

In essence: the filter property of a pivotchart subform has a parameter that references a control on a seperate popup form, and every one of the syntactual statements I've tried returns an "Enter Parameter Value" dialog (where they did not when the pivotchart was not a subform). I've also attempted to isolate this issue by putting the text box controls on the parent form (rather than the separate popup form) and referencing them via the pivotchart subform, but this provided no resolution (the same thing happened).

View 8 Replies View Related

Forms :: How To Populate Subform Fields When Drop Down Selected In Main Form

Mar 12, 2013

I have built a form that holds details of training records. What I want is when a drop down is selected in the main form, that it will populate some of the fields in the subform. I have this working at the moment, that for example, when a certain course is selected, that their modules will appear in the subform. Where my problem arises is that I have a relationship between two tables that I want to appear on the subform, so that details can be filled in on the subform against the list of modules that automatically appear.

View 2 Replies View Related

Queries :: Drop Down - Query Not Combining And Filtering Values Based On A Form

Jul 22, 2014

I have a form (DropDown form) that has 3 drop down fields, you select your values from the drop downs and you would push a command button that runs an event procedure which runs a query (DropDown qry test). The user should have the option of picking any combination of fields to filter by. Or no combination, which would return all values in all fields. So I am basically using the form as parameter's for the query.

The problem I'm having is that my query is returning values for one field AND values for another field. Even if the other values selected are not in the same record. It's not combining the fields together to filter. For example: you pick a Project name and Supplier name, the query will return records that have the project name you selected but it will also return records with the supplier name you selected that have a different project name.

I've attached screen shots of the form and the design view of the query (the screen shot cut off the last column name. It is meant to say "Expr3: [Forms]![DropDown form]![Combo7]").

Using Windows 7,
Access 2010

Is there a way to select multiple values from the drop downs?

View 14 Replies View Related

Filtering Field In 2nd Subform Based On Selection In 1st Subform

Sep 1, 2006

I almost have this form done.

I have a form with a combo box, and 2 subforms from it. When you select in the combo box (Group), it brings up the choices (Sections) for that group in a subform. Then there is another subform, that is supposed to bring up a series of questions that are related to the section that has been selected. The question field has a drop down to a list table, that has all the questions. Once the question has been selected, it stores in a Master table. The relationship is there. If you try to select any questions that do not pertain to the section, it gives you an error message.

What I need it to do, is when the section is selected, filter out the questions that pertain to that section, and have those questions be the only ones available in the drop-down list to choose.

I know that I need to have an After Update code once the section has been selected, but not sure how the coding should be.

I hope that someone can help with this!

:confused:

View 1 Replies View Related

Filtering Field In 2nd Subform Based On Selection In 1st Subform

Sep 1, 2006

I have a form that is almost complete

I have a form with a combo box, and 2 subforms from it. When you select in the combo box (Group), it brings up the choices (Sections) for that group in a subform. Then there is another subform, that is supposed to bring up a series of questions that are related to the section that has been selected. The question field has a drop down to a list table, that has all the questions. Once the question has been selected, it stores in a Master table. The relationship is there. If you try to select any questions that do not pertain to the section, it gives you an error message.

What I need it to do, is when the section is selected, filter out the questions that pertain to that section, and have those questions be the only ones available in the drop-down list to choose.

I know that I need to have an After Update code once the section has been selected, but not sure how the coding should be.

I hope that someone can help with this!

View 1 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 A Subform - When Is A Subform 'loaded'?

Nov 22, 2006

I have an SQL query that filters a subform based on the selected item in an option frame that runs on the after update event of the option frame.
Forms!fsubPrjPersonnel.RecordSource = SQLText & WClauseWhen I try this out, I get the following error message:

2450 - xxx can't find the form 'fsubPrjPersonnel' referred to in a macro expressions or Visual Basic code.

I then ran the following snippet and found that the form is not recognized as being loaded when it is "open" as a subform
If IsLoaded("fsubPrjPersonnel") Then
MsgBox "form found"
End If

If I open the subform as a form as well as having the main form & subform open, i.e. open a second instance of the subform from the database window, it filters fine.

I have been able to requery the subform so where am I going wrong?:confused:

View 5 Replies View Related

Filtering A SubForm

Mar 31, 2005

I have a sub form to which I want to apply filter buttons.
I have used the wizard to set these up.
The problem I have is that when I try to filter the SubForm the MainForm also filters.
The forms are based on tables and not queries.

Cheers

Gordon

View 1 Replies View Related

Filtering Subform..

Mar 6, 2006

Yes, Ive searched the forum and Im still stuck on this most basic of concepts - please can someone point me in the right direction?..

I have a Form [frmClient] and a subform [sbfrmCommsList]. The subform links nicely with the main form via [ID]. However I want to add a second filter on the subform selecting only [Type] = 2 rows (from the child table)

This is in the subform:

Private Sub Form_Load()

Me.Form.Filter = "Client=" & Me.Client & " AND Type =2"
Me.Form.FilterOn = True
Me.Form.Requery

End Sub


It still displays all records (Both [Type] 1 and 2)...
thanks..

View 2 Replies View Related

Subform Filtering

Sep 13, 2006

i have a form with a subform on it. the subform has 2 columns - one of which is hidden. Assume the other column is called "type".

i was wondering if there is an easy way to 'hide' records in the subform which have "type" = "Car"

thanks

View 3 Replies View Related

Subform Filtering Workaround

Aug 1, 2005

ok, i've discovered filtering does not work on subforms so i have searched the forum and modified some code to this:

Dim strSQL As String

strSQL = "Select * from tasks where"
strSQL = strSQL & Me!frmSubProjects.Form!Project = 2
Me!frmSubProjects.Form.RecordSource = strSQL


error message is " can't find the field 'frmSubProjects' referred to in your expression. (line3)

Please note a 'mouse over' of Me!frmSubProjects.Form!Project in the above code does show a result (first 'Project' value in subform) - so what am i doing wrong??

thanks in advance,
Paul

View 3 Replies View Related

Filtering Subform In A Form??

Aug 23, 2005

I have a tbl_product with PK_productID as primary key and frm_search with a subForm in it, How do I filter my subForm in a form with a single click button?? well... at first i did it with open new form with a specific data to display.

and from now on i want with a single click in my search form the result will show up in my subform but i don't know how to do it T_T

anyone can help me with this problem??

thnx...

View 1 Replies View Related

Filtering A Subform Using A List Box

Jan 8, 2006

I've finally figured out how to populate my list box with radio buttons (3 companys listed on the radio buttons, you click one and employees for that particular company populates the list box). Now I'm trying to figure out how to click on an employee in that box and have their contact information populate the subform that holds that info.

After trying unsuccesfully with VB, I considered using a macro that would open the subform where the Last Name = the Last Name clicked in the list box, but I couldn't figure that out (couldn't figure out what the name would be for the selection in the list box) but I would prefer the subform be there permanantly in "add" mode untill a selection is made in the list box.

I'm code ignorant and rely on google and what books I have for reference / copy-past.....any ideas?

View 3 Replies View Related

Filtering A Subform Using A List Box

Jan 8, 2006

I've finally figured out how to populate my list box with radio buttons (3 companys listed on the radio buttons, you click one and employees for that particular company populates the list box). Now I'm trying to figure out how to click on an employee in that box and have their contact information populate the subform that holds that info.

After trying unsuccesfully with VB, I considered using a macro that would open the subform where the Last Name = the Last Name clicked in the list box, but I couldn't figure that out (couldn't figure out what the name would be for the selection in the list box) but I would prefer the subform be there permanantly in "add" mode untill a selection is made in the list box.

I'm code ignorant and rely on google and what books I have for reference / copy-past.....any ideas?

View 1 Replies View Related

Filtering Query For Combobox In Subform

Jun 21, 2005

I have this form where there's mention of CompanyID

In a subform, I have the information about all the contacts of this Company. In order to see full detail information for a particular contact (of that particular Company) I have a Combobox with a query.

At least: that's the whole idea. Unfortunately it doesn't work in Access:
SELECT Contact.ContactID, Contact.Name
FROM Contact
WHERE ((Contact.CompanyID)=(Me!frmCompany![ContactID]));

Can any help me? I need to do more of the sorts of queries... and I can't figure it out how to use values from forms and parent-forms.

Any help is appreciated,

Jazz

View 1 Replies View Related

Combo Box Subform Filtering Problem

Sep 12, 2006

Hi all

I have been using some code from this site to filter my forms and subforms via a selection of combo boxes. However, when I try to filter by either date or callid, I get runtime error 2001 and the debugger drops in at the first forms!filter line. This seems to work perfectly well for the other 3 combos that I use. Is it to do with the type of fields I am trying to filter with or am I missing something integral to the code? Each combo is named Filter1, Filter2, etc and the name of the field to filter by is placed in the tag line for the corresponding combo box.

Private Sub Command13_Click()

Dim strSQL As String, intCounter As Integer
' Build SQL String.
For intCounter = 1 To 5
If Me("Filter" & intCounter) <> "" Then
strSQL = strSQL & "[" & Me("Filter" & intCounter).Tag & "] " _
& " = " & Chr(34) & Me("Filter" & intCounter) & Chr(34) & _
" And "
End If
Next

If strSQL <> "" Then
' Strip Last " And ".
strSQL = Left(strSQL, (Len(strSQL) - 5))
' Set the Filter property.
forms!frmoutershell.frminnershell.Form.frminnerinn ershell.Form.Filter = strSQL
forms!frmoutershell.frminnershell.Form.frminnerinn ershell.Form.FilterOn = True
End If
forms!frmoutershell.frminnershell.Form.lblfilter.C aption = strSQL
End Sub

Any help would be appreciated as I am getting quite frustrated with it only working on certain parts of the form.

Regards

Jason

View 3 Replies View Related

Queries :: Comboboxes - Filtering Subform

Jun 5, 2013

I have a username combobox and a number combobox filtering a subform. If there is a userName but no number I want to pull all the records for that userName regardless of number and vice versa with a number and no userName. And if they both have something then both are being used for the filter.

I have been trying iff statements and isnull in query criteria and cant seem to find what I need.

View 1 Replies View Related







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