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 Replies
ADVERTISEMENT
Jun 21, 2015
I have been looking some information on changing image based on form combo box selection on form.
I manage to do case by case but i need it in a simple code because their will be many employees just to avoid adding case by case code for each one.
Private Sub Emp_IDCombo_AfterUpdate()
Select Case Emp_IDCombo.Value
Case "AM-001"
Imageholder.Picture = "C:UsersAMGDesktopam-001.jpg"
Case "AM-002"
Imageholder.Picture = "C:UsersAMGOne DocumentsHR & Admin DatabaseEmployee Picturesam-002.jpg"
End Select
I have employees table where all images location is saved in text field and i have a combo box on form which is employee id.
Tables relationship
Employees_table [PK] to Contracts_table [FK] via field name {emp_ID}
Fields Name
Combo Box name on form Emp_IDCombo and row source is SELECT Employees_table.Emp_ID, Employees_table.EmployeeName, Employees_table.Emp_Pics FROM Employees_table;
Text field is located in employees_table called [Emp_Pic] for images location.
View 10 Replies
View Related
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
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
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
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
Jun 3, 2015
I have a dashboard-style form that has a list box with tasks connected to a query with line items of those tasks.
I have another query that will only show the line item selected from the list box. This means the query will only have one line item.
I want to have a command button below the list box that, when clicked, will modify the solo item in the second query to change a yes/no field from no to yes.
How can I accomplish this? Also, how can I make a button that deletes the selected line item?
View 3 Replies
View Related
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
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
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
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
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
May 1, 2005
I have a main form with a control that can take one of three values. And I would like to add a subform that work as follows.
Selecting each value should change what the subform displays like this.
Control Subform
A Select * from TableA where Key = "A"
B Select * from TableB where Key = "B"
C Disable subform somehow because it doesn't apply
Could someone please provide some advice on how I could do this.
Thanks
Fearless
View 1 Replies
View Related
Oct 20, 2005
Hi everyone,
I have two combo boxes on the same form bound to a table. I want the contents of the next combo box to change based on the previous combo selection e.g
cboContinent cboCountry
Africa Zambia
Africa Congo
Africa South africa
Europe England
Europe Holland
If I choose Africa in cboContinent, I want to see only Zambia, South Africa and Congo under cboCountry and if I choose Europe I want to see only England and Holland
Thanks
Humphrey
View 1 Replies
View Related
Aug 24, 2004
I have a Form with some combo box's in header and a TabControl with 5 tabs in Body.
In each Tab I have a subform. All is working as should.. each form is requerying perfectly based on user combo choices.
What I would now like to do is swap one subform in one tab for another subform, depending on what choice is made in combo box.
That is...
Combo choice 1 ... requires Subform's 1, 2, 3, 4, & 5 in Tab's 1, 2, 3, 4 & 5 ..
Combo choice 2 though... requires Subforms's 1, 2, 6, 7, & 8 in same Tabs. .. Tab's are umbrella's for multitude of subform possibilities.
I really need some guidence here. Thanks.
View 4 Replies
View Related
Feb 3, 2006
Is there a way to take a form, select the fields that you want to display on a template(I created the template)? Then the fields that aren't selected grey/disable them? In other words. We perform several tests, ie. test 2006.01 and 2006.02 etc. Each test is based on 1 table. So instead of having to go in each time a new test is needed, can I create a form that has selectable fields(checkboxes), and once I say ok it opens the "new" template it will have the fields that need to be on that test then grey out the ones that aren't going to be used this time around? Sort of new to this....
View 2 Replies
View Related
Feb 3, 2014
The user will be creating a new project that contains a bunch of releases. The releases have standard names which are stored in a table tbl_ReleaseNames It should be noted that the list of names is not static.
The user selects which of the releases pertains to their project and then based on their selections, new records would be created in tbl_RFP_Release and then a subsequent form would open where it would display each of these newly created releases where they could enter additional information. I thought of creating an unbound checkbox associated with each of the standard names, and then checking to see if the checkbox was checked and then creating the new records followed by opening up the new form.
View 6 Replies
View Related
Apr 10, 2006
Hello!
I have almost completed my database, everything I had originally intended to implement into it has been done, with some extra added features I popped in along the way. There is just one more thing I require assistance with...
My database is used for booking camera kits in and out. On the add booking form the user has to pick a "Camera Type" from a combo box. When they have made their selection, a form pops up with details of all of the components contained within the kits. The user can then check/uncheck the relevant components and close the form.
I have used a command button which prints off the data contained within the current booking form, and also the data contained in the form that pops up when the camera type is selected.
However, as there are more than 1 different types of camera, comprising different components, I need to be able to print off the form relevant to the kit type.
I do not know how I can do this as I have just specified the command button to print the form for the default kit.
I basically need some VB code which will print the form based on my combo selection, as my knowledge of VB is pretty primitive, I was wondering if someone could help me out :)
Any help would be appreciated!
View 2 Replies
View Related
Oct 25, 2005
I have a form which has a listbox listing all the letters a student has had sent home. Basically i want to be able to click on a letter in the list box and for a popup form to open with the record details. However it just brings up a blank record.
The list box has a unique field called standardletterID.
the code behind the button to filter was just used through the wizard to open the popup form is:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmstandardletterspopup"
stLinkCriteria = "[StandardLetterID]=" & Me![List0]
DoCmd.OpenForm stDocName, , , stLinkCriteria
but it doesnt seem to be working :(
I thought this would be easy but no matter how much i destroy my database trying to do it its not playing ball!
View 1 Replies
View Related
Nov 29, 2014
I am trying to generate an email that will send a copy of the last record entered from my table "Main" to a departement email, based on the department field entry on my form.
I know that I can send emails both thru outlook as well as direct. Would prefer to sent the direct (without opening outlook). Here is what I'm working with:Table with record informaiton called "Main"
Form called "Action Entry" which contains the information that I would like to send- part of which is a feild called "Assigned To" which is a list of departemnts linked to a secondary table called "departments"
Table called " departments" which contains the following Fields: ID, Departments, Email.What I would like to happen is when I hit the exit button on my form, an email goes out to the "Assigned Department" email address associated to the select departmet, that shows the information in the form (which i expect will be a report saved as PDF). I understand some of the VB code to create an email, but don't knwo how to tell it to select the correct email based on the Department selected on the form.
View 5 Replies
View Related
Mar 17, 2014
I have two forms linked together.
frmMaterialRequest
MaterialRequest
Status
frmHandledBy
MaterialRequest
HandledBy
What I want is to meet the following:
- Form 2 to be locked but its "MaterialRequest" is enabled.
- HandledBy to be unlocked if the MaterialRequest meets the "Status" of "frmMaterialRequest" which is "Approved".
View 9 Replies
View Related
May 26, 2013
I have "donations" form with a cbo called "DonationType".
(frmDonations.DonationType)
General
Employee Match
Employer Match
Angels*
Friends*
Royal Crown*
The last three options need to redirect the user to a different form used for pledged donations.
View 2 Replies
View Related
Feb 12, 2014
I have three different forms.
1. form is a Login form where i choose between: AA, HH or FA
After choosing on my first form second form opens.
Now my question - how can i do the following:
Based on the combobox in form 1, my button i form 2 will either open form 3, 4 or 5...
View 1 Replies
View Related
Jul 30, 2013
I would like to set up a picture in the form that changes based on a combobox selection, for example if you select from combo box list "design1", a picture that have a name : design1 will appear as a background to the form ..
View 8 Replies
View Related
Nov 6, 2013
Is it possible to add a field (i.e., variable) to a query (or SQL programming) based on a form selection?For instance, if I use a form to allow an end-user to specify which fields they wish to include in the query (essentially creating a UI for the query builder), how would I go about creating the query/SQL or updating the query/SQL?
View 3 Replies
View Related
Feb 15, 2015
I have been building a database for use in a charity shop and am struggling with an issue regarding one of the forms.
I currently have a form which displays all expenses from the shop. I have added a combo box to the top of this form which allows users to filter records based on an expense ID Code. It all works fine but I would like to be able to add a start date and end date box to the form also so that records can be shown between two dates.
I have tried adding parameter boxes to the query which runs the form (which works) but the issue I am having is that when a new id is selected from the combo box the parameter boxes pop up again asking me for start date and end date again. This happens every time a new combo box id is selected.
I think the way resolve this issue may be to add a start date and end date box to the form but I don't know how to implement this.
Please see the attached files for images of what I currently have. The forum won't let me post images directly here until I have 10 posts so I have had to attach the files instead.:
Query running the form - Attachment 1
The Form itself - Attachment 2
Combo Box - Attachment 3
Bound Column on combo box - Attachment 4
Code in Combo Boxes after update event - Attachment 5
View 3 Replies
View Related