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 Replies


ADVERTISEMENT

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

Display Subform Based On Selection

Mar 20, 2006

A tricky one this. Searched for answer but cannot find.

Acc 2003.

I have a main menu with 2 subforms.

In the on load event it sets the source object of the first subform, which displays a list of options (menu Style).

When choosing an option from SubForm1, I want SubForm2 to display the form I have coded in.

I currently have within subform 1 in the on click event the following.

Form_MainMenu.subform1.sourceobject = "formtodisplayinsubform2"

When running this from the main menu, nothing at all happens.

When opening just the subform 1 on it's own and clicking the option, it merely opens the main menu form.

Can anyone see what I am missing?

Thanks in advance

View 2 Replies View Related

Refresh Subform Based On Combo Box Selection

Dec 30, 2005

I have a form with three subforms, and I'm having problem with one of them. The link between subforms and forms are store number, which is stored in a combo box. Idealy, after a user pick a store from the combo box, the subform would update itself. Two out of the three subforms are based on two crosstab queries and they work perfectly fine. The last subform is a select query, and it seems like it's not rerunning itself after updating the combo box. The query is very simple, it just has store number, description, and grouped by amount. I tried with no criteria in the store field and run the masterform,seems like all it's doing is showing value for the first store in the table, and never changes afterwards, I also tried entering "forms!frmStores!cmbStore" in the criteria for the store, then the subform came out empty, it seems like it's only reading combo box's default value null. I have a line of code for the mater form frmStores as "me.[DisplaySubform].requery" for all three subforms, but it seems like it's working for the first two and not the select query. Anybody can help me with this? oh, the combo box is unbounded, because i do not want my table to be updated by selection. Please help

View 1 Replies View Related

Change Subform Based On Form Selection

Jul 2, 2005

Greetings! This forum has been most helpful to a rusty Access user.

I'm creating a student group score entry form, having problems with creating the form I want. Say for example we have the following:
1. Three groups: A,B, and C.
2. Group A has 5 students, Group B has 3, and Group C has 20.

I want a form where I can select group A, and a list of the students will populate and enable me to enter scores for all of them on the same page. This will save time not having to re-enter the information for so many students. If anyone has a clue of what I'm talking about or is willing to lend me aid, I would appreciate it.

Cheers.

View 4 Replies View Related

Subform Based On Selection Combobox In Main Form

Aug 25, 2005

Hello.
I am trying to make an invoice sheet in Access 2000.
My program consists a Order Sheet (frmOrder2), Delivery (frmDelivery) Sheet and a Invoice Sheet (frmInvoice).
All three are linked by DoNo.
The DoNo is made by frmOrder2.

I have a form that is called frmInvoice and a subform called subInvoice.

What I basically want to do is, to get the subform (subInvoice) to show records depending on the selection in the combobox DoNo in the main form.

subInvoice should show the Items, UnitPrice, Amount, TotalPrice, Remarks. These Items should show the records of frmOrder2.

I am kind of confused and totally lost, because I have no clue how to start!
And I am quite a beginner so, bear with me! Thank you!

View 4 Replies View Related

Find Record In Main Form Based On Selection In Subform

Nov 8, 2004

Can someone tell me how I migh find a record in a main form based a a selection in my subform?

I have a Main form called frm_ProductionSchedule.

It contains three subforms:
frm_ProductionSchedule_subform
frm_ProductionSchedule2_subform
frm_ProductionSchedule3_subform


I would like to be able to select a record within any of the subforms and have the main form display it. The main form is linked to a SQL server Table. The subform are based on queries. The unique PK field is a date field called record_date.

I should add that the Link Child/Master fields are blank for all Subforms. Each Subform is linked to a query and displays data for a particular machine (1,2 or 3) AND is updated based on a combo selection of the Production week. The queries for one subform would look something like this:

SELECT dbo_tbl_ProdSchedule.PartType, dbo_tbl_ProdSchedule.PartNumber, dbo_tbl_ProdSchedule.Work_order_no, dbo_tbl_ProdSchedule.FrameType, dbo_tbl_ProdSchedule.FrameNumber, dbo_tbl_ProdSchedule.Shift, dbo_tbl_ProdSchedule.Sch1_date, dbo_tbl_ProdSchedule.Sch1_spins, dbo_tbl_ProdSchedule.Sch1_sheets, dbo_tbl_ProdSchedule.Sch2_spins, dbo_tbl_ProdSchedule.Sch2_sheets, dbo_tbl_ProdSchedule.Sch3_spins, dbo_tbl_ProdSchedule.Sch3_sheets, dbo_tbl_ProdSchedule.Sch4_spins, dbo_tbl_ProdSchedule.Sch4_sheets, dbo_tbl_ProdSchedule.Sch5_spins, dbo_tbl_ProdSchedule.Sch5_sheets, dbo_tbl_ProdSchedule.Sch6_spins, dbo_tbl_ProdSchedule.Sch6_sheets, dbo_tbl_ProdSchedule.Sch7_spins, dbo_tbl_ProdSchedule.Sch7_sheets, dbo_tbl_ProdSchedule.Frames_due_date, dbo_tbl_ProdSchedule.Comments, dbo_tbl_ProdSchedule.Record_date
FROM dbo_tbl_ProdSchedule
WHERE (((dbo_tbl_ProdSchedule.Sch1_date)=[Forms]![frm_ProductionSchedule]![cmbSchDisDate]) AND ((dbo_tbl_ProdSchedule.SpinCoaterNo)=1));

AND WHERE ((dbo_tbl_ProdSchedule.SpinCoaterNo)=2)), etc. Respectively for each subform.

Thanks in Advance!!

John

View 4 Replies View Related

Forms :: Fill Datasheet Subform Based On Selection In Parent Form?

Dec 6, 2013

What I have is a form that takes in information regarding test data. Each test run can record data for multiple requirements. I am able to pull all data fine, however in order to make it easier on the user i was hoping to populate the requirements subform based on a selection of "test group" in the main form.

Commonly run together requirements can fall in to groups. I have a selection box for these groups in the main form and a table that stores these group id's and group setup. Is there a way to autofill the tables records that the subform is linked to based on the selected test group?

View 3 Replies View Related

Modules & VBA :: Populate Data Sheet Subform Based On Combo Box Selection ALL

Aug 20, 2013

I have an unbound combobox on a form that is used to filter the records of a subform based on who they have been assigned to. The combo box is based off of a query to the personnel table and utilizes a UNION querry to add the option "**ALL**" with a id number "111111" as the first option in the combo box.

In other words: the combo box has a list of names to choose from and the word "ALL" at the top as the first selection. The idea is that when "**ALL**" is selected, the subform should display all records regardless of who they have been assigned to. I'm trying to accomplish this with VBA. I've started developing the code to try to impliment this, however currently when "**ALL**" is selected, I'm getting a datatype missmatch that seems to be caused by my use of recordset.

Option Compare Database
Option Explicit
Private Sub cboTaskListName_AfterUpdate()
'On Error GoTo cboTaskListName_AfterUpdate_Err
Me.Refresh

[code]...

Also once the queried records are saved into the record set, how can I communicate that to the subform so that it displays them?

View 2 Replies View Related

Forms :: Auto Populate Subform Based On Selection In Parent Form

Apr 30, 2015

I've got a Parent form (frmProspectDetails) with a subform linked (fsubProspectSkill).

This form is for users to enter general information on a prospect (names, position, height, weight, etc) on the parent form and skill levels on the subform.

Currently the subform is set so the user has to manually select the specific skill set for the prospects position, and then enter a value for each skill level(1-99).

I'm trying to get the subform to auto populate with a specific skill set based on the position selected in the parent form, so the user only needs to input the skill level without selecting each specific skill.

This data is then stored in a table (tblProspectSkill)

To add, I've created a form (frmPosition) that lists the specific skills set for each position.

I'm not sure how to get this subform (fsubProspectSkill) to auto populate with the specified skill set from frmPosition.

View 6 Replies View Related

Forms :: Subform Field Selection By User

Jun 8, 2013

I need to have the user select what fields he wants displayed in the subform, (this i think would be best to have a selectionform open and have a list of fields that can be placed in the sub form i was thinking of using checkboxes for this), then i would like to open the mainform and the subform would display only the fields the user selected.

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

Open Subform At Certain Recordset Based On Subform

Feb 5, 2005

I have a main form which has a subform control in it. when the main form is opened the sub form control contains a list of events in a sub form (a summary view), for the person selected in the main form.

I want to change the subform to a different one which shows the whole event when i click in a field on the subform, based on the event i clicked in. ( i can do it by opening a new form but not with a new subform)

I can make the form change using the following code:

Private Sub Notes_DblClick(Cancel As Integer)

Me.Parent.subformhere.SourceObject = "eventsfullrecord"

End Sub

What code do i need to make it open to the record i clicked in the summary form, rather than just opening to the first record every time?

Not very good at passing recordsets

Thank you

View 4 Replies View Related

Filtering A Dropdown Selection Data Field?

Mar 1, 2005

I'm trying to filter my table so that i can make it a query. The data in the Facility is linked to another table with FacName and FacID. When i try to filter the data to create the query from the table, it says type mismatch. It's really bothersome....btw is there another way to create a filtered query?

View 2 Replies View Related

Showing Subform Based On Whether Or Not A Field Is Blank Or Null

Sep 15, 2015

I am trying to show a certain subform based on whether or not a field is blank or null. This database is not owned by me--it's what we use to run queries and reports on the data on a centralized server for the library. It's not even in the same city--so changing the tables is not an option for me.

So, I have a subform (subform1) that is linked to the main form based on 2 fields (BibID and Item_Enum). The trouble is that the second field (Item_Enum) is sometimes blank, so the subform will not display. So I created another subform (subform2), which is a duplicate of the first one, but this time only linked on the first field (BibID). So, if that second field (Item_Enum) is blank, I want subform2 to display and subform1 to be hidden. If the second field (Item_Enum) is not blank, I want subform1 to display, and subform2 to be hidden.

I've tried putting the VBA code on different events for the form, but I can't get it to work consistently.

There are two problems, one of which I think I have fixed--but I would prefer a better solution. The VBA code doesn't run unless the form is newly loaded. I've tried placing the VBA code on different form events, but nothing works. I want the code to activate whenever a new record is displayed. The work around is that the form IS newly loaded every time the user scans a barcode for a new book. That works now, but if I need to change the way the user looks up new records, this might not work anymore.

The second problem is that the VBA code doesn't display subform1 when Item_Enum is blank. It doesn't display subform2 either, but that's the desired result.

Private Sub Form_Load()
If Me.ITEM_ENUM = "*" Then
Me.subform2.Visible = False
Me.subform1.Visible = True
Else
Me.subform2.Visible = True
Me.subform1.Visible = False
End If
End Sub

I've tried changing the condition to Me.Item_Enum = null, and changing the false/true results accordingly, but that didn't work either. In that case, only subform2 is visible, whether it should be or not.

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

How To Fill A Subform Based On A Different Subform

Mar 16, 2006

I have two subforms on a form. When the user clicks on the 1st Subform the 2nd one will populate depending on what was selected on the first one. I have a click event but the 2nd subform isn't being populated correctly.
Is this possible?

View 7 Replies View Related

Forms :: Graying Out / Disabling Field Based On Other Fields On Form / Subform

Jun 27, 2013

I am wanting to grey out/disable a field on a form based on entries in two other fields being the same. One of these fields that contains the data to be referenced in on a sub-form.The form is called 'Payment_Information-Form', the field to be greyed out/disabled is called 'SUF A Paid?'

The fields that are being referenced are: 'Set up fee in s (SUF) Recrt Restriction A <=' which is on the main form, and 'SUF_Letter' which is on a sub-form (within the main form). The sub-form is called 'Costings_11_Previously_Paid_SUF subform'.If 'Set up fee in s (SUF) Recrt Restriction A <=' equals 'SUF_Letter' then grey out.I tried the following formula in both the On Current and After Update sections but it hasn't work.

=IIf([Forms]![Payment_Information-Form]![Costings_11_Previously_Paid_SUF subform].[Form]![SUF_Letter]=[Set up fee in s (SUF) Recrt Restriction A <=],[SUF A Paid?].[Visible]=True,[SUF A Paid?].[Visible]=False)

View 4 Replies View Related

Forms :: Hiding Columns On Subform Based On Multi-Value Lookup Field

Aug 7, 2013

I want to use VBA to hide columns in a subform based on what is checked in a multi value look up field.

I am creating this DB for use with sharepoint as a web database, which is why I am using the lookup field to begin with. There will be a client DB to use with some VBA code

So what I have is a lookup field with tests "Test 1, Test 2, etc" on form sample.

There is a subform called results, and I want to hide certain columns based on what tests are performed.

I tried using an If Then statement (code is being run on subform load)

If Me.Parent.fieldTest = "Test 1" Then
Me.Test1Col.ColumnHidden = False
Else Me.Test1Col.ColumnHidden = True

That is basically the code I was trying to use. I am getting an error 13, which I assume is because fieldTest can not = something since it is a multi value look up field.

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

Forms :: Continuous Subform - Control To Display Image / Icon Based On Another Field

Jan 9, 2014

I have a continuous subform which queries a table of attachments. I'm using Access 2007 but not using the Attachment datatype; this DB will grow considerably and I don't want to waste precious space by filling it with bulky files. So instead, I have code which makes a copy of the attachment and adds the hyperlink (to the copy) to the table instead.

Now - I want to add a control to the subform to display an icon / image reflecting the file type of the attachment (Word doc, Excel s/s, PDF etc.)

But not sure how to go about it.

I was thinking I could use FileSystemObject.GetFileExtension at the point in the code where the attachment is added, and add a new field to my attachments table (i.e. translate "*.xls*" to "Excel", etc.) Then store / embed a handful of images for the core types I would expect and use an image control on the subform to display the image based on the value of that field.

But is that even possible / feasible?

Or, is there a handy API which can retrieve the icon associated with a file type based on what has been installed on the local machine (even if there is, there's still the problem of setting up the image control to display the appropriate icon specific to each record...)

Or, is there another control available which would be better suited to something like this than an Image control?

View 4 Replies View Related







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