I am trying to get get 2 comboxes to refresh from one when cascading. The first combobox (Location) works, but the second one (Catches) doesn't. All I get are the Key values of the catches rather than the values...
I am wondering if it my relationship set up of if my VBA needs to be altered to accommodate the requering the two comboboxes.
Code:
Private Sub cboCategory_AfterUpdate()
Dim sCatchLocation As String
Dim sCatch As String
sCatchLocation = "SELECT [tblLocation].[Location_ID], [tblLocation].[LocationCategory_ID], [tblLocation].[Location] " & _
"FROM tblLocation " & _
I have 4 Comboxes all Cascading from one an other and it's all working fine. My question is about My fourth combo boxe, It as two fields that the user can see when he selects the fourth comboboxe; pretty straightforward...
I want the user to see the two fields on the form after using the combo boxe. For this I have one of the record to populate the comboboxe and the other one to populate an other text box using the dlookup function where the criteria is = to the field selected in the combo boxe, I hope you're following...
Now, some of my records for each fields are not all different from each other so when the user select a set of value the "dlookup text box" may have several option: the index is not unique if you see what I mean...
To have the unique index, I would need to add to the 4th combobox the primary key which is an autoNo that the user doesn't really need to see...
So... I am thinking of hidding the primary key column in the comboBoxe and make it the main field THEN write a code on the after Update of the Comboxe to hide the comboxe and show a text box placed over the comboxe with a dlookup function with a criteria = primary key and an other text box set on a different field with the same criteria.
I hope this is making sense, I was wondering what you were thinking of this method, it seems to involve a lot of fiddling which I don't mind but I'd rather make sure that i making it right.
Hi! I want to use cascading comboboxes but when i'm setting criteria for second combo box, the "combo box form value" is not visible. i've tried to use the same names as in example form. It didn't work. I have always the window asking for value of the parameter. What should i change ?
I've searched the forum but can't quite find what I'm looking for. I have one main table (tblFOBData) with the fields Material, MarketCode, Vendor and Cost. I also have a form that uses the Material and MarketCode fields in cascading combo boxes and this works fine, However, If you select a Material and MarketCode it will only return a single record and so I would like to autofill the data from the other two fields on to the form, preferebly without using a subform is this possible
Well first i'd like to say hi to hopefully all the good people out there who can help me.
My problem is this, i've searched through the forums and cant seem to find the right solution to what i'm looking for.
I've used the instructions to construct my cascading combo boxes in the form, now all i want is the 3rd and last of the combo boxes, once selected to automatically insert the corresponding Name in the text box below it.
The text field is bound as its need in the table.
The last combo box selects the code and the field i want to show is the data name in the text box that matches the code in the combo box.
I know its something to do with the AfterUpdate event in the combo box but dont know what code to use.
I Have A Form With A Combobox When I Choose A Record from The Box, The Matching Info From The Table Populates A Textbox Example I Choose The Acct Number From The comboBox And The Company Name Goes In a Textbox and the phone number in another textbox looks like it is fine on the form My Problem Is That When I Look At The Table The Company Name Is In Its acctName field But The Account Number Field Has The Companies Name Aswell How Do I Fix This- and also if you type the number in the acctnumber field on the table it places that number in the acctname textbox of the form there is something that is mixed up here but i dont where
I usually use ComboBoxes to show a user-friendly name instead of an ID. For example, I would use a ComboBox of EmployeePK, FirstName + " " + LastName and set the first column as the control source but with 0" width.The issue is these are supposed to be read only. I can prevent the user from changing the field but I don't have a good solution for hiding the ability to select the drop down.
My current method is to create a transparent box over the combobox (so it can't be selected) then hide the dropdown arrow with a background colored rectangle.
In my database you can search on either number or name. I have therefor, two combo boxes. and it works well, except that...
When I pick by number first, and then try to pick another record using the name combobox, the number combobox still shows the first search I did. I would like the two comboboxes to interact with each other...
- My second table contains if it is hardware or software:
- TypeID (Primairy key) - ApparaatID - Type (where I entered hardware and software in 2 different entries)
- The thirt table contains operating systems:
- OSID (Primairy key) - ApparaatID - TypeID - OS_versie (where I entered all the OS I want to enter)
Now I made a form I called problemen with 4 comboboxes.
- cboApparaat - cboType - cboOS - cboProbleem
1) What I want is that when you select device 1 and 4 that cboType can select both hardware and software but with device 2 and 3 you can only select software.
2) If you have selected software is cboType I want you to be able to select 1 of the 11 OS I have pre-entered in the table.
3) That you get specific problems with the previous made choices. For example if you select Hardware in cboType, thta you only get problems with hardware to select from and the same with software and OS.
4) I want a textbox, that will contain the solution of the problem you selected and that if there and several solutions that you get all of them at once.
I have two comboboxes on my form. When the value of the first combobox (SourceWH) changes it performs a requery on the second (DestWH) as the drop-down list needs to be filtered depending on the first value. I have this working fine but my problem arises when I need to be able to swap the values of each combobox. I have created a command button which stores the value of each combobox and then swaps them but my problem is that if I click the button the second combobox becomes blank. I guess this is something to do with the requery taking place after the value of the first combobox is updated but am unsure how to rectify this problem.
The first combobox has the following expression in the expression builder: Action Argument Requery DestWH
The command button has the following code:
Private Sub Swap_Btn_Click() Dim SourceValue, DestValue As String SourceValue = Me.SourceWH.Value DestValue = Me.DestWH.Value Me.DestWH.Value = SourceValue Me.SourceWH.Value = DestValue End Sub
1) How to auto fill in a text box if you select a value from the last of 4 cascade comboboxes.
I have 4 comboboxes where
1 = Apparaat - cboApparaat 2 = Type - cboType 3 = OS - cboOS 4 = Probleem - cboProbleem
With all 4 comboboxes I have the vba code Me.cbo[name combobox].Requery
If I select the last combobox, cboProbeem. I want the textbox underneath to automaticly fill in the solution of that problem. I already tried to use the following vba code
Me.Oplossing = Me.cboProbleem.Column(5)
But it does not work.
2) I want to make a form for customers, where I can fill in customer info, device info and date when there contract started. Now I want to use SUM to fill in the end date of there contract.
I tried and failed to get this to work using a multiselect listbox..I have a list of departments in tblFunctionalArea...My main table is tblStatic..I want to be able to for each record select multiple departments affected by a record and store them in the tblStatic.After looking around i couldn't find many people successfully maanging to store listbox values in a table...
I decided to create 5 fields in tblStatic and in my form create multiple combo boxes cboFunctionalArea1, cboFunctionalArea2 etc etc which are bound to these fields.I want to be able to ensure the list for any combo box requeries and takes out any selection in the other boxes.
I have this working in a strict cascade fashion i.e. in cbo1 all dept's visible, in cbo2 it takes off whatever was selected in cbo1 etc. But if someone then jumps back and deletes the content of cbo3 then the whole thing breaks or if they amend in the wrong order it breaks
I have two unbound cascading combo boxes on a form that limit the data for a stored field.
I am designing this as a subform to show software installed on a PC (hence the need to have a continuous form). As the manufacturer, software package and edition are already stored in my database, I am storing only the ID of the edition to limit duplicating data.
I would like to show the values in the cascading combos that relate to the edition ID stored as well as filtering the edition ID using the combo boxes (i guess a filter and a reverse lookup)
Please see attached pic. First record was entered as Microsoft Autoroute. New record for Manufacturer Frontier, change the previous records combos.
We've got an Access Database that I've edited in the past, I've got the cascading combo boxes set up so that, depending on which employee is selected, different "rate" options appear as work done. If I open the database afresh and select an employee (for example, employee 9 in Image 1 and employee 19 in image 3) the rates given to that employee are correct.
However, if the database remains open, I can't get the rates to update with the selected employee - even if the employee is clicked, rentered, etc.
I have a cascading combo box that successuflyl returns data from sql server tables venue and date, when I save the record it saves the values but when I re open the record for a particular patient the combo box values are cleared and do not display patients appointment venue and date although it is saved in the database. How can I return the values in the combo boxes which were saved.
I have built several combo boxes in other DB's but haven't had this happen before. I am adapting a template DB to work for me. The form is continuous and I added a field [CategoryID], I want the [ProductID] to filter based on CategoryID choice. Pretty straight forward and it works, but the [ProductID] field will not hold the text value. It's a number field to hold the ID value, and bound column is 1(Select query is ID,ProductName,StandardCost) with ID and StandardCost column widths set to 0cm. I can choose CategoryID, the ProductID combo filters correctly, then when I proceed to the next record, the ProductID goes blank.
I have a form with various input boxes, three of which are combo boxes. These combo boxes need to affect one another. So let's call these cmb1, cmb2 & cmb3.
Hypothetically let's say:
Within cmb1 the list is A, B, C & D
If the user was to choose A, cmb2 would show the options 1, 2, 3, 4, 5 etc.. If the user was to choose B, cmb2 would show the options 2, 4, 6, 8, 10 etc.. if the user was to choose C, cmb2 would show the options 1, 3, 5, 7, 9 etc..
(So, it is possible that if the user chooses A from cmb1, cmb2 would show 1 and if the user chooses C from cmb1, cmb2 would also show 1)
Using the example in the brackets above:
If the user chose cmb1 - A then chose cmb2 - 1, cmb3 would then show the options Option1, Option2, Option3 etc..
BUT
If the user chose cmb1 - C then chose cmb2 - 1, cmb3 would then show the options Random1, Random2, Random3 etc..
At the moment I have a table with 3 columns. Within the table is every possible combination of the drop down, i.e:
-A l 1 l Option1 l -A l 1 l Option2 l -C l 1 l Random1 l -C l 1 l Random2 l Etc...
I have tried to use the example shown on this website but i've had no luck: fontstuff.com/access/acctut10 (If you look at "Example 2", thats what I tried to do)
I have a subform that I use on two parent forms. The subform has a cascading combo box. The LocationID field gets filtered after CompanyID (named: cboCompanies) is updated. The problem is that I can only get the combo box to work on one form (Contacts_All). When I open the second form (Contacts_Clients), it asks for the Parameter Value.I am entering this into the criteria for the LocationID field:
[Forms]![Contacts_All]![SUBFRMContactsCompanies]![cboCompanies] Or [Forms]![Contacts_Clients]![SUBFRMContactsCompanies]![cboCompanies]
So, the "Or" is not working.Do I need to make a separate subform for each parent form or is there some way to get this working? I already feel as if I am managing way too many forms and need to simplify.
updating my table when I use cascading combo boxes in my form.What is happening is that my table is being populated by the xxxxID column vice from the xxxxName column that is being used from that specific table.
here is my visual basic code that I am using to determine what the subsequent combo box will display.
Option Compare Database Option Explicit Private Sub cboPlanktonID_AfterUpdate() ' Set the Family combo box to be limited by the selected Plankton Type Me.cboFamilyID.RowSource = "SELECT tblFamily.FamilyID, tblFamily.FamilyName FROM tblFamily " & _ " WHERE OrderID = " & Nz(Me.cboPlanktonID) & _ " ORDER BY FamilyName"
[code]...
Example of the Combo box Row Source is: SELECT [tblWaterbody].[WaterbodyID], [tblWaterbody].[WaterbodyName] FROM tblWaterbody;
My Control Source is PlanktonAnalysis.WaterbodyName
When I fill in the form with the data, The Waterbody name is visable for selection (example: I see "Lake Lillinonah" in the cascading combo box, But when I save the record in the PlanktonAnalysis Table I get a number in the WaterbodyName column vice the name of the waterbody
i have a main form which allows me to fill in Order Information within which is a subform which allows me to fill in Order Lines.My Order Lines contain the following fields:
Extrusion Length Qty etc. etc.
Elswhere in my database (tblLengths) I have set up a list of possible lengths for each Extrusion and therefore when an order is filled out I want the user to be restricted only to those lengths that are possible with the particular extrusion they have chosen. This list contains the ExtrusionID and LengthID so that I can query the available lengths for a particular Extrusion.Within my subform I have set the record source to point at the tblLengths and criteria on the ExtrusionID to point to [Extrusion]. I've also put a requery against the Extrusion field so that I can force the combobox to refresh its list of results.
My problem is that I am getting unexpected results each time I add an Order line into my form and reading up I see that what I am trying to do is a big no-no.
On a form I am making, I have two combo boxes. Box 1 has "Title" and Box 2 has "Full Name". In the table associated with FullName, there is a Check Box name "Still Attached".
What I am trying to do when choosing a "Title" in Combo Box 1, I would like only the people with that "Title" and a check in "Still Attached" to be available in the drop down list.
I have tried and I can get combo 2 to filter by title, but not by the "Still Attached" value.
I am totally new to Visual Basic.I have dependent cascading combo boxes setup. The hierarchy goes:
Segment Family Class Brick
Now, I need the value in the Brick field to create a varying number of other cascading combo boxes. They are the Brick Attributes. The brick attributes are the labels for the combo boxes and the brick attribute values would be the values you can chose from within the combo boxes. Depending on which Brick you chose, there are a varying number of Brick Attributes, and thus a varying number of needed combo boxes to pop up.