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....
productId ( which is filtered from combo boxes on main form) . productId contains two columns 1 bound column(id) ( hidden with width 0 ) 2 column (desription) ( shown with width 2 )
Now after entering the data when i come back to the form again . It hides the data from the productId field on subform , because data in combo box (on main form) doesn't match. Although the row is showing up , only the text in field (productId) is hidden.
Now when i change data in combo box on main form to match the ProductId , then the productId field text shows again. after changing combo box it hides . What i need is the existing data should not hide when i change the combo box selection.
see pic 1 where product matches and pic 2 where not. please note i am using master child relationship on the form/subform.
Sure hoping someone can help me with this. I have a main form with a continuous subform. I am trying to filter the subform "behavior" combo box with another combo box on the subform "learningtype". The subform filter works fine if only the subform is open, although I can't add records because it would require a record in the main form. However, now that I've added the subform to the mainform, when I open it it asks for the parameter value of the filter combo box on the subform. Can someone help me, please...I'm desperate. I'm attaching a sample for you to look at.
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.
Is it possible to use Filter option in my form without using Query Wizard? - So that the user would be able to edit and change the other field on the same form
I have three linked tables [Regulator], [RuleBook] and [Rules] (each has a corresponding form for data entry).
In the "Rules" form, when you select name of the regulator, the rule books dropdown down is filtered to show only the rulebooks for that regulator. the code I use is:
Private Sub Regulator_Change() Me.[Rule Book].RowSource = "SELECT [ID],[Rule Book],[Short Code],[Regulator],[RegName],[Short Form],[Active] FROM" & _ " [RuleBook] WHERE Regulator = " & _ Me.Regulator Me.[ShortReg] = Me.Regulator.Column(3) End Sub
Basically, if I select the FSA as the regulator, The Rule Books drop down is filtered to only show the FSA Rule Books. If I pick OFT, I get the OFT list etc. This all works fine.
In the [RuleBook] table, each entry has a yes/no tick box called "Active".
The reason for this being that the regulators change their rule books quite regularly, but from an audit perspective, I can't delete or overwrite the old ones once they are no longer valid.
What I want to do, is further filter the rule book list to those where Active=True so that when I select FSA, I can only choose from their current rule books and not the ones that are no longer relevant.
I have a suppliers table and a products table. Two forms, Stock form with combobox to list Suppliers and a sub form with combobox that lists Products.I want to select a supplier from the Stock form and then the combobox in the subform to only list products directly sold by the Supplier.Have dabbled in SQL as follows:
SELECT Products.ProductID, Products.ProductName FROM Suppliers INNER JOIN Products ON Suppliers.SupplierID = Products.SupplierID WHERE ((Stocksubform.SupplierID=Stock.SupplierID)) ORDER BY Products.ProductName;
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).
i have a main form for customers and a subform for sites which is set to locked so its displayed as just a list. I have a button on my main form to add a new site for the current customer displayed..How can i get the Main form '1CustomerDetails' with subform '2SiteList' to automatically refresh one i've clicked the save button on another form.
I have this form that contains subforms to hold different types of infomation for different clients. At the top of the form it has the case #, first name, last name, and then a tab element in which each of 6 pages (tabs) holds subforms for other information associated with the client.
I have a table that holds only client number and name.Then each of the six subforms operate off of a table, and all the tables are connected through relationships using client number, first name, and last name.
How could I make the subforms autofill their cooresponding tables using the case #, and name fields from the main form without having to repeatedly input the client #, names for each tab/subform?
I have a form that shows information on a person (think first name and last name) at the top and contains tab controls that hold subforms each containing a different set of info about that particular person. Ex: for person 1 the main form will display the persons first and last name as well as show the subject tabs. as you click on each tab you should see the information that pertains to that person. I would like to step through each ppeson one at a time using the horizontal record arrows (eventually I will change this process to using forward and back buttons) on the main form with the persons names changing as well as the information in the subforms changing to match the person on the main form. I can step through each separately (main form and each subform) but I cant get the subforms to change information when the main form changes persons. Seems simple enough but I cant get the subform to change when the main form changes. They are not connected. This is for an Access class that I am taking and we use Access 2013.
I am trying to create a time sheet that enables my workers to fill out separate work orders and the hours from those Work orders are auto transferred to a sub form within their daily time sheet. I have gotten all this done and I have the total hours transferring to the main form but I need to use that transferred number in a new sum on the main form. I know that this cannot be easily done just by using the expression builder.
I have a subform from which I want to calculate values into a text box on the main form, to keep a running total of weeks for individuals. Using the expression builder to just add the fields, I only get the total for the current sub-form record. If another record is added to the subform, the total reverts to zero, and then it takes that record's input as the total. Which makes logical sense.
I think I need to do a 'DSum' from the subform/table, but I'm not sure how to sum for just the current ID/individual. I have tried to bodge it myself with the expression builder, but it tells me that 'the function contains the wrong number of arguments'.
I have a form with a subform in it. The subform is actually going to actually have more information and is going to take up the majority of the form. The reason why it's the subform instead of the main form is because of the nature of the parent/child relationship.
Layout-wise I'd like to have the content of the main form in the top left, with the subform taking up the space from the top right down to the bottom. This ends up covering the content of the main form in the top left. I tried using the Send to Back function on the subform but it still blocks the main form.If there's no easy way then I guess I'll just have to have the entirety of the subform below the main form content.
I'm getting a #name? error in my text box in the footer (doesn't matter where this is placed on main form. I've changed this to be forms. and forms! but no difference in the outcome.I just want it to view the total figure from a purchase order subform. This is populating correctly but isn't being stored anywhere, just shows.Also, any way I could make this invisible when the form is in form mode?
I have a form and subform with the following names:
frmBasic sfrmCustomers
I have a unbound txt field called txtCustName on the mainform I want to populate this field from a field on the subform called CustName when the record is selected.
I also have an unbound combo box with the cust ids using the row source from the tables record source from the main form.
Me.txtCustName = Forms.frmBasic.sfrmCustomers.Form.CustName End Sub
This didn't work. So I put "= [Forms].[frmBasic].[sfrmCustomers].Form.[CustName]" in the control source of the text box on the main form I want populated.
The name doesn't appear in the field. I get #Name? in the field.
I am creating a booking database for a Bus Hire company. There is also an Invoice element to it, which will Invoice customers for a range of bookings that they've made.You will see in the screen image, the relationships between the four tables:
IN tblBooking (see screen dump) the customer is allocated a booking number and so on. However, at the end of the month, the Customer will be invoiced for specific bookings. I would like to, firstly, select the customer in the Invoice form, then in the InvoiceDetails subform, select THE BOOKINGS THEY HAVE PREIVOUSLY Made using a look up. (see screen dump called frmInvoice.Gif)
I have applied a criteria to the data source for the look up. (see image datasource...GIF) with forms![frmInvoice]![CustomerID] in the hope that the query will search for BookingIDs where the currently selected CustomerID (in Form Invoice) finds a corresponding match in tblBooking.
I have a Main Form which is essentially the based on my child table called tblTaskHistory. The Main Form has a subForm which is based on the parent table called tblTasks. I am using SQL queries to feed the combo box recordsource that is located on the Main Form. The After Update for the combo box populates the subForm which allows the users to look at details of a task before he/she "accepts" it. The problem is that when he/she clicks on the subForm to view the details of the task the Main Form locks up. The user, after interacting with the subForm, cannot make an edit on Main Form now. The user has to close the Main Form and then reopen it to perform the "accept" action. The form works absolutely as intended - that is if the user doesn't click on the subForm - however once he/she clicks on the subForm the Main Form locks up.
I have a music database. It's somewhat over the top in terms of the information stored in it, but I like it. My issue is with getting the total number of tracks, as well as the total duration, for a given album (and for each disc, but if I can solve one that should also solve the other).
I have a lot of tables and forms, but for this problem I only need to deal with two of each. They are the tables for albums, the table for tracks, and their associated forms.
In my album table I have information such as album title, artist, release date, and album length. The tracks table contains information on each song - track title, track number, parent album, and track length.
My main form is for the album itself, and contains a subform for the tracks on said album. They correspond to the relevant tables.
What I want to do is obtain the value of the album length by calculating the sum of the track lengths for that album, and the number of tracks. Easy enough - Sum(TrackLength) and Count(TrackID) respectively, both of which can be stored in the footer of the subform.
My problem is that, rather than simply copying those values into text boxes on the main form, I want to copy them into actual fields in the album table. Furthermore, I want them to update as I add or edit the track lengths in the subform.
I have an Orders form (frm-Orders) that includes a subform (frm-Order Details Subform). The subform has line item totals.I want to be able to sum the line item totals and show the result on the main form, but I can't get it to work. Seems like it should be an easy thing to do.
Someone suggested I try this but it didn't work:
In the footer of the subform I created this expression - =SUM([Line Item Total].
Then in the main form I created a textbox with this -- =[Forms]![frm.Orders].[Form]![frm-Order Details Subform].[Form]![txtSum].
I have setup my main form with 2 subforms to mimic a split form; this works fine.
To search for a record, I am using a cbo on the main form which I would like the user to select from. Once selected, then this will populate the first subform.
This is the code I have for the cbo:
Dim intAnswer As Integer If IsNull(Me!cboCaseNoCFDWit) Then Exit Sub With Me!sfFocus.Form.RecordsetClone .FindFirst "Me!sfFocus.Form!CaseNumber = """ & Me!cboCaseNoCFDWit & """" If Not .NoMatch Then If Me.Dirty Then Me.Dirty = False
[Code] ....
I get an error at the .findfirst; states that the Microsoft Engine does not recogize Me!sfFocus.Form!CaseNumber
And the reason I am not using a regular split form is because I cannot, get the form to the size that I want. The splitform works great with the code above (a few changes to it of course), but the bottom of the splitform (datasheet) is too long and I cannot shorten it.
I have an entry form with a field(combo box) called cboGetCode. I also have a sub form (continuous form) with number of fields, also an entry form. Now, I have added a code behind the cboGetCode AfterUpdate event to populate the result to relevant fields in the main form.
I am currently working on a project in access 2010 and I am having a search for record dilemma. I have a main form that has a subform in it under a tab control. I place a search box at the top of the form so that user could select either the ID, the internal case number, and/or the reviewer name in the text boxes to search the record.
I have tried the using the search for record macros and the convert the macros to VBA and possibly write so extra coding for calling the subform into the search but nothing seems to work in getting the search in sync between the main form an the subform. VBA code that will look for same record in both forms.
The reason for the tab control is because depending on the data entered the users switch between mid section data about case and so one set of info goes into one tbl and the other goes into another, but the subform that I am referring to in this question is being generated from the same tbl as the main form.