Forms :: Updating Table From Cascading Combo Box(s) Fox?

Mar 25, 2013

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

PlanktonAnalysisIDWaterbodyName172
311411511677118397104113
tblWaterbodyWaterbodyIDWaterbodyName2Ashland Pond3Bantam Lake4Crystal Lake5Gardner Lake6Hungerford Park Pond7Lake Lillinonah8Lower Bolton Lake9Middle Bolton Lake10Pocotopaug Lake11West Thompson Reservoir

View Replies


ADVERTISEMENT

Forms :: Selecting A Table To Be Populated Using Cascading Combo Box

Aug 6, 2013

I am trying to use a combo box to control which table a data entry form will write data to. I want to create a form that has a combo box to select from a top level table that I will call "Stores". Once a "Store" is selected from the drop down, the next field on the form will be a data entry field. The data entered in that field will be written to the table selected by the preceding combo box.

So, basically I would have say Wal-Mart, Macy's, Sears, K-Mart and etc, listed in my "Stores" table. Once I select one of the stores from the drop down, I would then enter a "department" name in the data entry field and based on which store I selected from the previous combo box, the data would be written to that stores department table (which each store will have its own department table), e.g., WalMartDepts, MacyDepts, SearsDepts, etc...

View 1 Replies View Related

Forms :: Cascading Combo Boxes For Table And Field Names

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

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

Forms :: Update Table That Is Recordsource For Combo Box That Is Updating That Table

Mar 29, 2013

I have a combo box (cboManifestNumber) that is based on the following table:

tblManifestData
ManifestDataIDPK (autonumber PK)
ManifestNumber
RemovedDate
ManifestComments
TsdfIDFK (FK frm tblTSDF)

This table is related to:

tblTSDF
TsdfIDPK (autonumber PK)

I need to be able to update tblManifestData with a new manifest number and manifest comments, along with assigning it a TSDF. how to be able to enter a new manifest number and the associated data without having it create two lines in tblManifestData. I thought that I could enter a new manifest number, then requery the table and form so it shows the complete list of manifest numbers (including the recently entered one) while staying on the newest entry.

View 2 Replies View Related

Forms :: Prevent Combo Box From Updating Table

May 21, 2015

I have a combo box on my form which loads fields from a table and displays them using

Code:
SELECT DISTINCT table_team.team FROM table_team;

I then use

Code:
=[qry_showteamforedit]![team]

in the default value for the combobox to show the team which is saved in the current record.This is the qry_showteamforedit:

Code:
SELECT table_team.team
FROM table_team RIGHT JOIN table_staff_details ON table_team.ID = table_staff_details.team
WHERE table_team.ID = table_staff_details.team;

My problem is when I move through the records, if I change the selected value using the combo box it changes the actual value in the table from the one that was selected to the new one. If I was on record 1 and the teamid saved in there was 1 . It would display "team one" but if I changed that to "team two" it would change record one to say "team two" instead of "team one".I have been searching and found that this is because it is bound to the table so need to remove the text from Control Source, which when I do, breaks it, and it doesn't display the saved team.

what I would like it to do is display all the teams, but default to the one saved by using the id saved in the main table, but allow me to change this value. I would also like a second cascading combo box which will display a list of subteams dependent on what main team was selected and again, default to the values saved in the main table. I have managed to get cascading combo boxes working but combining them with my tables and queries is proving difficult. This is how my tables would be ( just showing the relevant fields)

Staff_table
ID Name teamID
1 Dave 1
2 Tom 1
3 Matt 2

team_table
ID team subteam
1 team1 subteam1
2 team1 subteam2
3 team1 subteam3
4 team2 subteam4

Is it is the subteams that will be unique I would like to save the subteam ID to the teamID field of the staff_table. that way i can retrieve the team and the subteam using the same ID.

View 2 Replies View Related

Cascading Combo Boxes From Same Table

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

Forms :: Cascading Combo Box Setup

Jan 20, 2015

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.

Image 1: Freshly opened database, - Correct Rates
Image 2: Database remains open, - Incorrect Rates
Image 3: Freshly opened database, - Correct Rate
Image 4: Database remains open, - Incorrect Rates

I've tried to make it requery when clicked... or before the event... or on form click... or anything, but it doesn't want to know.

View 2 Replies View Related

Forms :: Cascading Combo Box SQL Backend

Jan 14, 2015

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.

View 11 Replies View Related

Forms :: Cascading Combo Box - Loses Value

Mar 21, 2013

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.

View 9 Replies View Related

Link Cascading Combo Fields To Table

Mar 1, 2005

This is my first attempt with cascading combo boxes (2) and with the help of the forum I've made it work BUT, I feel like an idiot because I'm drawing a complete blank on how to link them back to a "main" data table.

The example I used as a reference was to create them as unbound boxes while using queries to pull for each of the combo boxes. I have 4 tables. One will serve as the main table while 3 others are each feeding one of the combo boxes. I went back and set the main table as the record source and added some of the other fields but those unbound fields have me stumped.

If anyone recognizes an earlier post that clarifies this, please let me know. I've looked through numerous posts but haven't found one yet.

Just like everyone else, any help would be greatly appreciated.

mike

View 1 Replies View Related

Forms :: Triple Cascading Combo Boxes?

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

Forms :: Cascading Combo Box On A Shared Subform

May 30, 2013

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.

View 1 Replies View Related

Forms :: Cascading Combo Boxes In A Subform

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

Forms :: Cascading Combo Box Based On A Check Box Value

May 6, 2014

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.

View 11 Replies View Related

Forms :: Cascading Combo Boxes Setup

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

Forms :: Stuck With Cascading Combo Boxes

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

Forms :: How To Create Cascading Combo Boxes

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

Forms :: Cascading Combo Box Not Displaying Properly

Nov 18, 2013

I have a cascading combo box on a work order form that pulls the contacts from the customer selected in the main box.

It's working fine, values are printing fine on the reports, etc. however on the form itself - when you change from one record to another....the value is not displayed even though it's there if you click the report.

View 5 Replies View Related

Forms :: Cascading Combo Box - Cannot Choose Contact?

Jan 7, 2014

I have two combo boxes. One with the customer and one with the customer contact. These boxes seem to be working fine however, after you select the customer and then the customer contact box updates, it isn't allowing me to choose the contact. Nothing happens when you click.

View 7 Replies View Related

General :: Cascading Combo Boxes With Junction Table

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

Tables :: Table Structure For Cascading Combo Boxes

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

Bound Cascading Combo Boxes In Continous Forms

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

Forms :: Cascading Combo Boxes (multiple Filters)

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

Forms :: Cascading Combo Box To Select Record To Edit

Sep 19, 2013

I am attempting to create an attendance database that needs to be able to be updated if someone calls in sick.

I have created a cascading combo box where you can select a date up to 15 days into the past with the following code in the rowsource for cboDate

Code:
SELECT DISTINCT tblAttendance.dataDate FROM tblAttendance WHERE (((tblAttendance.dataDate)>Date()-15)) ORDER BY tblAttendance.dataDate DESC;

an after update event has been coded to show only employees who have been scheduled for the day

Code:
Private Sub cboDate_AfterUpdate()
On Error Resume Next
Me.cboAgentName.RowSource = "Select tblAttendance.agentName, tblAttendance.attendance,

[Code]....

So basically what i need to do is be able to use the cascading combo boxes to select the date and employee to go to that specific record so i can update the other fields. Currently when i attempt to do this with my current form, it automatically goes to a new record when i select a date and name and doesn't update the existing record.

View 1 Replies View Related

Forms :: Cascading Combo Box In Same Datasheet View / Subform

Oct 10, 2014

Is there anyway that we can do cascading combobox in the same datasheet view of subform? Basically I'd like to filter "Account Name" based on "Plan#" selected in the same record of subform.

View 3 Replies View Related







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