Forms :: Displaying Data Based On ComboBox Selection
Jan 20, 2014
I'm building a new db for tracking tests/results, using Access 2007.
On this issue, I'm working with 2 tables, Sample and Equipment.
On a form to enter sample info, I have a combo box to select a piece of equipment.
When the equipment is selected, I need to have a sub-form populate with several fields of data from the equipment table, based on the equipment selected.
I'm not trying to save the equipment data again, I just need to display it, based on the equipment the user selects. This is just a kind of second check to remind the user what the equipment he's selected will do.
On my form I would like the user to be able to select a company, and once the company has been selected I would like a box to display all the contact information for the specific company. I would also like this box to record the contact information onto my database along with the other information that will be gathered on the same form.The Contacts and Companies are linked with the COSYSNO and CoSysNo fields.
I have a Table with 57 fields. I would like to display this table in a form as a subform, but only certain fields depending on what selection is made in a combo box.
For instance, if the user selects "Missing Information" in the Combo Box, then the form will show a few standard fields such as ID, Market, Sales Manager, and then some specific ones such as date missing information requested and date missing information received.
If the user selects another option, again the standard fields will remain plus a few different ones.
I have done much searching on this and feel like I am so close but so far. I have looked into controlling the record source of the subform, columhidden =false and a multitude of others. All of which may or in fact probably do work in this situation but I can't seem to put it all together.
it's easy to set up a form with a combobox that will list all records and moves the user to the selected record. But I can't figure out how to just show a selection of the records in this combobox, instead of all records.
So, to use the example used in most online tutorials: a drop down menu shows you all the names in a customer database. However, I'd like to have instead a dropdown menu with an overview of all surnames in the database and that I move to the first record with the selected surname.
I am having issues with my combo box populating values based on the selection from another combo box.
Database : contains 2 tables: Staff_List, Level_Type and a form called frm_Test The first combobox cboLevel gets its value from the Level_Type table with the select statement SELECT [Level_Type].[ID], [Level_Type].[Level_Type] FROM level_Type;
The values to be displayed on the second combobox cbo_Name is expected to be dependent on the Level selection made from the first combobox i.e if Level 1 is selected in cboLevel then only Names of people in Level 1 will be displayed in second combobox.
The select statement I put there is SELECT Staff_List.ID, Staff_List.Staff_Name FROM Staff_List WHERE ((([Staff_List]![Level])=[Forms]![frm_test]![cboLevel])); This is not displaying anything in the second combobox after I tried it in the Form view, just empty.
When I amend a combobox I want a label to adjust to reflect the current cbox input.
I have used the event change and done on change me.label = me.cbox.value and that works however the cbox has 2 columns. The unique category id and the category. So at moment if i choose the first option from cbox i get 1 appear in label as opposed to clematis for example.
What code to use to select the second column from cbox value.
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 ..
I am designing a Web Database with a bound form to a submit table.
On the form, I have a combo box with selections that should influence the value to be displayed in a textbox also on same form.
For instance the combo box for Staff Name contains list of all Staff and I want the textbox to automatically display the level of the staff that was just selected in the combobox.
I know how to get this done using a combobox but my boss insists that the level should be automatically displayed in the textbox once combobox selection is done.
Using the combobox for level, I used the select statement in the RowSource property :
SELECT Staff_List.Level, Staff_List.Staff_Name FROM Staff_List WHERE (((Staff_List.Staff_Name)=[forms]![frmtest]![cboStaffName]));
I am in a dilemma of how to replicate this for the textbox because textbox only has control source and no RowSource where I can put this select statement.
Also, I will still need to bind this textbox to the submit table with the column name "TxtLevel" in the control source
Please see attached sample access db.
Also note that I cannot use action queries or VBA because it is a Web database and not a client database.
The main form contains a combobox, populated from a query which pulls in specific data (time) from a table
The subform is linked to the combo box on the main form. Based on the combobox selection, the subform updates with associated records with the combobox selection
I would like to add additional functionality in the form load event, that would read the current time and identify the nearest value in my combobox.
I have tested the code below behind a button and it works
If Time() > "13.00:00" And Time() < "14:30:00" Then MsgBox "The Time is " & Time() cboPricingCADeadline.Value = "14:30:00" Else cboPricingCADeadline.Value = "NA" End If
Would a loop through the recordset of the Combobox be best used here? Set the first and second values of the recordset to variables, query the time and then return the value if statement is true, or move to the next record in the rs replacing the first and second variable values
eg If value1 > time() and value 1 < value2 then cboPricingCADeadline.Value = value1 end if
If this is a good lead, how do I go about setting up my recordset?
I am having a problem with my access graph, I have a combobox and based on that selection from the combobox I need it to display on the graph. It works fine ,but once i change the query to what i want to be displayed on the graph it doesnt show the bars , just the information .
I have 2 comboboxes, the first one is called "activity", whereby I have 3 options to choose from, and the second is called "level".
When I click an "activity", for example Drawings, I want the "level" combobox to list a unique set of options for that category. and if I click on a different "activity" for example Planning, I want the "level" combobox to show a completely different set of options.
If anyone can give me any help on how to do this then I would be very grateful!!
I am designing a nomination form (web database so no vba macros can be used).
The form has 3 combo boxes: cboStaffName, cboLevel, cboNominee.
The form is bound to the tblSubmit table where the submissions are populated.
I used a select statement:SELECT Staff_List.Staff_Name FROM Staff_List; to populate the combo box for the Staff Name selection.
This is the select statement to populate the job level combobox:
SELECT Staff_List.Level, Staff_List.Staff_Name FROM Staff_List WHERE (((Staff_List.Staff_Name)=[forms]![frmtest]![cboStaffName]));
The select statement to populate the combobox for the nominee combobox:
SELECT Staff_List.Staff_Name FROM Staff_List WHERE (((Staff_List.Level)=[forms]![frmtest]![cboLevel]));
The problem is that the staff_name in the first combobox is still found in the nominee combobox which should not be because a staff cannot nominate self. There is a field in the Staff_List called YesNo that should be activated for each staff that is selected so that the select statement on the nominee combobox can be updated accordingly to remove items with the field "Active"
How to get the checkbox selected for each corresponding staff.
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!
I have a table of raw materials that have two fields, their stock code and longer description.
I have another table that is tracking the usage of these materials. I want both the stock code and longer description to be recorded in the usage table.
I want the "Description" field in the usage table form to auto populate when the user selects the corresponding stockcode from a combobox.
I am trying to run a report based on a combobox selection. I have three different reports, each for the three different items in the combo box. I just don't know how to code it so when I run the report, it picks up the name in the combo box and opens the correct report. This is what my code looks like for the button that will run the report:
Private Sub Command7_Click() DoCmd.OpenReport ("Signers Authorized for Check Writing"), acViewPreview, , WhereCondition = [BTrans] = "Check Writing" DoCmd.OpenReport ("Signers Authorized for Stop Payment"), acViewPreview, , WhereCondition = [BTrans] = "Stop Payments" DoCmd.OpenReport ("Signers Authorized for Wires"), acViewPreview, , WhereCondition = [BTrans] = "Wires" End Sub
The problem is, that as soon as I hit the Run Report button, all three reports open up, so it is not reading what is in the combo box. The quotes, "Check Writing" , "Stop Payments" and "Wires" are the actual selections in the combobox and [BTrans] is the name of the combobox.
I am creating a Database to track product details and inventory for items we purchase.
I have several Tables and several Forms already working properly, except for one thing.
I have a Form called "Lights", and it contains a ComboBox called Light_Name and 6 TextBoxes: Manufacturer, Model_Number, Cost, Weight, Light_Type, Notes. It also has an Attachment Field linked to the same table.
I am using the Code:
Me.TEXTBOX = Me.Light_Name.Column(#)
to populate the Textboxes with the relevant info from the Light Table.
This works for every Textbox I have.
However I cannot get the Attachment Box to change. And when I try to add code to it I get a debug error. The Attachments are PDFs and I need them to show based on the ComboBox Selection.
I have tried the same code as above, and as I said, it gives me an error.
Firstly apologies for posting what is likely to a really simple problem and probably has been explored before. I have been looking through other treads but nothing that I could identify really fits the bill.
Essentially based on choices made against a combo-box, I wish to lock or hide combinations of fields/combo box within the form. Realistically I want to lock rather than hide.
All the fields/combo boxes in the form I want to effect are bound.
I can effectively do this as long as the fields/combo-boxes are unbound, but it seem to fail when they are bound.
Any assistance would be really helpful so thanks in advance.
I have a table (ComponentT) of different device components a user can select from ( generators, gearboxes, etc.)
The table has 3 fields - ComponentName, ComponentType, ComponenentDetails
I have a query returning all the ComponentDetails values.
I then have a combobox that uses this query as a row source.
The user can select different components they want from the combobox. Once something is selected, it is added to a new table - UserSelectedComponentsT
As a device can have only one gearbox or one generator etc. I want a warning messagebox to be displayed if the user tries to select a generator from the combobox when one has been previously selected.
I am trying to use a combobox called Manufacturer to select which table the combobox called Model gets it's rowsource from using the code below.
Code:
Private Sub Manufacturer_AfterUpdate() If (Me.Manufacturer.Value = "Siemens") Then Me.Model.RowSourceType = "Table/Query" Me.Model.Recordset = "SeimensTable" Me.Model.RowSource = "SELECT Model FROM SeimensTable" Else If (Me.Manufacturer.Value = "Samsung") Then Me.Model.RowSourceType = "Table/Query" Me.Model.Recordset = "SamsungTable" Me.Model.RowSource = "SELECT Model FROM SamsungTable" End If End If End Sub
But when I run the form and select Manufacturer. Combobox Model remains empty. tell me what I'm doing wrong?
I have a form based on a query.On the form I have 4 comboboxes.The combo boxes filter eachother without a problem (based on custom select query).Now I want after the fourth combobox value is selected, I want to populate a text field with a value from a different column from the master query (after the 4 selections only 1 value should be possible)I try to say this easy.Master query contains 5 columns:
- group - type - job - insurance - charge
combo1 selects group (and filters records) combo2 selects type (from remaining records and filters again) combo3 selects job (from remaining records and filters again) combo4 selects insurance (from remaining records and filters again)
[code]....
This works great and the dropbox only shows 1 OF EACH DIFFERENT record...If I add a text box and want to see the "charge" value, that I thought I could use the ME.text-code. But in order to do this, I have to add the charge column into the query of Combo4.the dropbox for insurance gives me multiple values that are the same. Is there any way to make this work?
Got a bit stuck in a database. I have a form based on a query. On the form I have 4 comboboxes.
The combo boxes filter eachother without a problem (based on custom select query)
Now I want after the fourth combobox value is selected, I want to populate a text field with a value from a different column from the master query (after the 4 selections only 1 value should be possible)
Master query contains 5 columns: - group - type - job - insurance - charge
combo1 selects group (and filters records) combo2 selects type (from remaining records and filters again) combo3 selects job (from remaining records and filters again) combo4 selects insurance (from remaining records and filters again)
Combo4 is based on following query: -column1 Insurance Total=Group by Show=yes -column2 Job Total=Where show=no Criteria [forms]![name].[combo]
This works great and the dropbox only shows 1 OF EACH DIFFERENT record
If I add a text box and want to see the "charge" value, that I thought I could use the ME.text-code. But in order to do this, I have to add the charge column into the query of Combo4.
If I do this, the dropbox for insurance gives me multiple values that are the same. Is there any way to make this work?