Forms :: Create A Data Entry Form To Order Table Using 2 Cascading Combo Boxes
Jan 31, 2014
What I am trying to do is create a data entry form to an "order table" using 2 cascading combo boxes. I have created a data entry form based on a query. I can't get the cascading combo boxes to work properly.Here is the code:
Private Sub Combo0_AfterUpdate()
Combo2.RowSource = "SELECT L2_ID,L4_Element_name,L5_Category FROM qry_ord WHERE L3_ID = Combo0.Value;"
Combo2.DefaultValue = [Combo2].[ItemData](0)
Command4.SetFocus
End Sub
[code]....
View Replies
ADVERTISEMENT
Jun 10, 2015
how to create the cascading combo boxes that I need. For this, I have three tables:
Locations -- All store locations
Products -- Part Number and DESCRIPTION of any type of item that is available for rent
Serial Numbers -- (Unique) Serial number for each individual product, with its Product ID (foreign key) and Location ID (foreign key)
Each location has its own set of products available for rent, each with their own serial number. There may be more than one of the same TYPE of product at a location, but there will never be a repeated serial number.
I would like to have three (cascading) combo boxes. The first would allow the user to select a LOCATION. The second will have a list of all the types of products available at that location (DESCRIPTION). The third should have the list of SERIAL NUMBERS available at that LOCATION for that type of product (DESCRIPTION).
View 3 Replies
View Related
May 15, 2013
Currently, I have a form with a combobox that lists all of the names of the tables inside my database. Depending on the table selected in the first combobox, I would like to have another combobox which allows the user to choose from the field names inside that table.
View 3 Replies
View Related
Jun 1, 2005
Hello everyone
I have read the FAQ on cascading combo boxes and have managed to apply the theory to my DB's data input form (frmDataEntry) which is very cool and prevents a lot of errors however in doing so it no longer populates the underlying table (tblProductionDetails).
I am at a loss as to how to correct this as you can see from the example I need the customer and description field to be populated with the correct data rather than the fields I am using to make the cascading combo boxes work.
Any help would be greatly appreciated
Regards
Adrian
View 3 Replies
View Related
Mar 12, 2011
I have been trying to modify a sample database to suit what I want to do but I am getting stuck on the very first part cascading combo boxes i want to open a form and add multiple items to a table - first i want to select, from a combo box a department - then select a supplier from all the suppliers/manufacturers related to that department then select a stock item based on the description from all the items available from that supplier
I have attached the database I am using to modify and my database.
View 5 Replies
View Related
Apr 29, 2015
I have a form with four combo boxes on it, the four boxes all open the same form and return a record based on the selection from a different column from the same query.
To make it work smoothly I think I need to make it so it is only possible to enter data in one combo box at a time. I could also do with some error handling.
View 2 Replies
View Related
Mar 14, 2005
Checked the FAQ on this but doesn't apply to what I need.
Basically, I have a Product Class, and Products that are in the class. My database is for a computer component business, so the clsses are Processors, Mainboard etc.. and the products that fit into that class. The Class and products are listed in the Products table, and I need a way to have it on my subform, so I can choose the product class from one combo box, and then have another combo box to view the products in that class.
Right now I have it :
SELECT DISTINCT Products.[Product Number], Products.[Product Description] FROM Products
and that lets me select ALL the items in my products list, but I also have a Product Class Combo in the form that does nothing yet - So I thought adding :
WHERE (((Products.Product Class)=(!FORMS![Orders Subform1]![Product Class])) ORDER BY Products.Product Class
To the end would sort it, but it doesn't and gives me the error : "Syntax Error (Missing Operator) in query expression"
What am I doing wrong?
Cheers,
James.
View 1 Replies
View Related
Jul 24, 2013
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)
View 7 Replies
View Related
Jan 28, 2014
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.
View 12 Replies
View Related
Jun 24, 2014
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.
View 14 Replies
View Related
Feb 6, 2015
OK, I so I am trying to filter one combbox tbltCatch from tblLocation (which is a sub filter from tblLocationCategory). Thing is, I am trying to select "Catches" filtered from the tblLocationCategory table. Reason being is because the "Catches" are the same the location types (example below). I know the code I am trying to utilize is incorrect and needs to be modified.
Code:
Dim sCatchLocation As String
sCatchLocation = "SELECT [tblCatches].[Catches_ID], [tblCatches].[LocationCategory_ID], [tblCatches].[Catches] " & _
"FROM tblCatches " & _
"WHERE [tblCatches].[LocationCategory_ID] = " & Me.cboLocal.Value
Me.cboCatches.RowSource = sCatchLocation
Me.cboCatches.Requery
Me.Refresh
View 14 Replies
View Related
Jul 5, 2013
I'm jumping to the forms development and going to try what I need via queries and SQL. I'm trying to do a series of cascading combo boxes which have worked out fine, right till I hit the first junction table.
I will include the VBA code below as well as a screenshot but here's how it goes.
REGION cascades down to COUNTRY cascades down to PORT and then to CARRIER.
This is for a shipping program.
When it gets to PORT and are trying to cascade to the various CARRIER's thats where it hits a junction table of PORT_CARRIER.
Here is REGION to COUNTRY:
Me.cboCountry.RowSource = "SELECT COUNTRY.CNTRY_ID, COUNTRY.COUNTRY FROM COUNTRY " & _ " WHERE REG_ID = " & Nz(Me.cboRegion) & _
" ORDER BY COUNTRY"
Me.cboCountry = Null
COUNTRY to PORT :
Me.cboPort.RowSource = "SELECT PORT.PORT_ID, PORT.PORT FROM PORT " & _
" WHERE CNTRY_ID = " & Nz(Me.cboCountry) & _
" ORDER BY PORT"
Me.cboPort = Null
PORT to CARRIER:
Me.cboCarrier.RowSource = "SELECT PORT_CARR.PORT_ID, PORT_CARR.CARR_ID FROM PORT_CARR " &_ " WHERE PORT_ID = " & Nz(Me.cboPort) & _
" ORDER BY CARR_ID"
Me.cboCarrier = Null
PORT to CARRIER is where the problem is.
It populates the combo box, but with the ID numbers instead of actual CARRIER names.
(the Junction table are two PK fields and are lookups to PORT in PORT table and CARRIER in CARRIER table.)
Is there a magic spell for cascading combo boxes when you hit a junction table?
View 14 Replies
View Related
Jul 19, 2014
I need a table structure that will allow me to have a repair log data entry form with 3 cascading combo boxes on the repair log data entry form. There can be many repairs for a specific job but most of the time there will be one repair per job and 1% of the time two or more repairs for a specific job.
I am pulling a report based on a query that will show the repaired location, facility type, repaired item, repaired component on that item and other details related to the repair.I uploaded an empty database with the structure.
Cascade levels
I. Facility Type
II. Item by [I]
III. Component by [II]
View 14 Replies
View Related
Jul 19, 2006
My goal is to have two combo boxes the first filters the second. it controls the semester that I am viewing. This works if i don't use continous forms but when i do it requeries every record in the form instead of the current record. I am not an access or vb guy but i have picked a lot up. please help!!!
I have attached a copy of my database.
View 4 Replies
View Related
Feb 23, 2015
I'm having some issues using the cascading combo box technique on my form.
I have a form, which contains a subform in continuous view, which contains a few combo boxes.
One of those combo boxes (available resources) should be filtered depending on the value of 3 other combo boxes (task types, source languages, target languages).
What I would like to be able to do is run the filtering routine on this resources cbo (currently VBA code that changes the row source value) when the user clicks on it.
It's kind of working right now: when I click on the arrow to open up the drop down list, the values are indeed filtered. The problem I'm having though is that, if I then click on that same cbo for another record (or any other cbo in another record for that matter), the resource cbo of the record I previously set gets deleted.
View 14 Replies
View Related
May 4, 2013
I've got a form (frmMain) with two combo boxes (cmbCategory and cmbProducts). I have set the combo boxes up to be cascading, so that when you select a value in the cmbCategory box, it influences what is visible and selectable in the cmbProducts box. What I wanted to happen is this:
1. User selects a category
2. cmbProducts defaults to the most recently entered Product within that category, and the form pulls up that product's details.
I have the cascading combo boxes set up so cmbCategory has an AfterUpdate event that runs a macro. In the macro is the command to refresh the cmbProducts box, and the cmbProducts box's RecordSource is set to a query that filters the Products based on the value of the cmbCategory box. I then set the cmbProducts Default Value to a DMax command that pulls the largest ID number from the query. Everything works great, except when I choose one category (the correct product comes up, the latest one entered for that product), then go back and choose a different category without reloading the form. The cmbProducts box stays showing the previous Product, and doesn't automatically update with the latest product for the new category. So it works the first time out of the gate, then just stops working, and won't work until I close and reopen the form again.
I've tried the refresh command, and I've tried adding an AfterChange event to the cmbCategories box. Nothing seems to work! I also tried running a close form/open form command in cmbProducts' After Update to enable the DMax command again, but this blanks out my Categories and Products boxes (which it's supposed to... I don't want anything to come up when you first open the form, both should be blank until you start selecting values).
View 2 Replies
View Related
Jun 3, 2013
How to properly use 3 cascading combo boxes.
I have them set up and they work, to some degree.
I have three boxes Type/Sub-Type/Item. They all filter down to the next one, the problem is, when I get to the 3rd box, it filters ONLY from the 2nd box and loses the filter from the 1st. What do I need to do to get it to maintain the filter from the first box and then ADD the filter from the second box when populating the 3rd box?
View 2 Replies
View Related
Jun 12, 2013
tried following Microsoft example and several others but my problem comes up when I click on Group in Ticket list, I get a parameter value popup. I know I'm getting it from my Where statement that is supposed to setup the row source for Category. I tried using numbers and text but I messed up somewhere when it comes to the vba.
Me.cboCategory.RowSource = "SELECT DISTINCT Category.Categories FROM" & _
" Category WHERE GroupName = " & Me.cboGroup & _
" ORDER BY Category.Categories"
Me.cboCategory = Me.cboCategory.ItemData(0)
View 2 Replies
View Related
Nov 28, 2014
I have a cascading combo box working fabulously in a form. However when I embed that form into another form, the cascading combo boxes quit working. After doing some searching around on the web I think my issue is either in the query that the dependent combo box references and/or in the "after update event procedure" but I just can't seem to figure out the exact changes to make to my database. Details:
Tables with data for combo boxes:LOOKUP TABLE - Veg Species - Species Type,
LOOKUP TABLE - Veg Species - Species Name.
Related together based on common field: SpeciesType
[code]...
When the form with the combo boxes is embedded as above, I can select the species type from the dropdown but when I try to select the species common name value I am asked to
"enter parameter value - Forms!SUBFORM2a - Enter Specific Veg Info!cmbSpecies_Type".
View 5 Replies
View Related
Apr 5, 2015
I have created a form to be used for data entry, Where i have identified standard data, I have set the Combo Box on the form to be a "Value List" so as to standardise the data entry.This creates two problems for me.
1. When Using the form, instead of saving the text value to my table it is entering a numerical character?
2. On two of my combo boxes, whilst they have been configured the same, when i try to select an option for the list, it does not accept it? when i try to type the same option into the field of the form it tells me that the option is not in the list?
View 2 Replies
View Related
Mar 5, 2015
I an trying to create a data entry form (IndividualsEntryFm) to input data for fields such as (First Name),(Birthdate) etc., these to be saved to the (IndividualsTbl)
I also have another table (NamesTbl) which has family names etc. The two tables are linked by a (MainID) field. I want a combo box on the individualsEntryFm so that I can select the family name. Then I wish the empty fields for the IndividualsTbl to be available to enter data.When I press the save button I then want this data saved, together with the MainID from the combo box to the IndividualsTbl.
I have set the IndividualsTbl with a (PersonID) field as an auto number each individual therefore has a unique PersonID but may well share the MainID. I'm trying to link many people to the same address.
View 1 Replies
View Related
May 10, 2013
I am trying to create a Cascading Combo Box for my Form in Access 2010. I ahve written the code:
Private Sub Combo11_AfterUpdate()
cboCombo13.RowSource = "Select TblAcc.SubFamily " & _
"FROM me.TblAcc " & _
"WHERE me.TblAcc.Family = '" & cboCombo13.Value & "' " & _
"ORDER BY me.TblAcc.SubFamily;"
End Sub
But keep getting the same "Run time error message 424: Object required"
And when I define the error it says "Identifier under cursor is not recognized" (the yellow arrow comes up and is pointing at the "ORDER BY" line.
I would like Combo Box 13 to give me the SubFamilies of the certain Families choosen from Combo Box 11. (Each Family has different SubFamilies). But if I ignore the error, Combo Box 11 lets me choose a Family and Combo Box 13 gives me options to choose any SubFamily in my DB.
View 14 Replies
View Related
Dec 5, 2013
I have three nested forms that is Form3 is withing Form2 that is within Form1 (in reality = 1 Form and 2 subforms cascaded).
I want to select a value from Combo1, that will further brings the values in Form2, and then further filter the values in Form3. If the three combos were on the same form, I wouldn't have an issue. But since each combo is in every cascading form/subform, I dont know how to pass the filterning further to the other two combos.
View 6 Replies
View Related
Dec 31, 2013
I have a set of cascading combo boxes. When a value is selected in Cat 1 ID, it narrows down the selections in Cat 2 ID which narrows down the selections in Cat 3 ID.
However, the values don't show up for columns Cat 2 ID or Cat 3 ID until I enter the row. Then I have it set to requery the fields because the underlying data isn't populated. But then when I leave the row, the values go away.
Why doesn't it show the underlying value from the table? Each column is bound to a field in a table - I would assume that the recorded value would show up. Did I miss something easy?
I've attached a picture of exactly what I mean.
View 2 Replies
View Related
Aug 7, 2013
I've been able to make a normalized relational database with cascading combo boxes, etc.
How to validate a field? The format needs to be according to the following:
<0 AND <=9999 [Optional: followed by a capital letter]
Examples of Valid Data:
7
4A
354
8756G
View 3 Replies
View Related
Apr 2, 2014
I have a problem with a cascading form, which writes back to another table. The scenario is:
There are three tables. Users, Departments & SubDepartments.
Each table has an Autonumber set as the primary key .
The form is to write back to the user table, and within the user table there is a Department & SubDepartment field. These are linked to the relevant tables and all that works.
For the form I have two combo boxes for Department and SubDepartment. Department simply pulls from the Departments table and displays/writes back to User table correctly.
The SubDepartment is the one I am having problems with. I have got it to cascade correctly but here is the exact issue:
On the existing records the subdepartment is being displayed as a number (the primary key autonumber). The drop down list displays the text of what the subdepartment is (which is what I require) but then when that is selected it throws up the error that the value entered isn't correct for that field. I guess it's because it wants to write back the numerical record ID rather than the text from the other field.
The row source query is SELECT [qrySubDepartment].[SubDepartmentName] FROM qrySubDepartment ORDER BY [SubDepartmentName];
The table fields for the subdepartment table are SubDepartmentID, SubDepartmentName, DepartmentID and SDID.
SDID can be ignored for the purpose of this question and DepartmentID links back to the main department. Just to confirm visually the cascading form does work in terms of when you pick a department it only displays the subdepartments associated to it.
View 2 Replies
View Related