Records Forgetting Data From Cascading Combo After Navigating Away

Oct 11, 2005

Hi all, complete Access n00b here requiring some assistance if possible with the dreaded cascading combos. Would appreciate any help I can get. I've tried searching but can't find this particular problem mentioned (am probably searching for the wrong thing, but anyway...) Here is my situation:

I have a form [Component] with a simple cascading combo box scenario [cboCategory] and [cboSubcategory].

[cboCategory] has as its row source -
SELECT tblCategory.categoryid, tblCategory.Category FROM tblCategory ORDER BY tblCategory.Category;

Control source is unbound.
I have Me.cboSubcategory.Requery as an afterupdate event.

[cboSubcategory]'s row source is -
SELECT tblSubcategory.subcategoryid, tblSubcategory.subcategory FROM tblSubcategory WHERE tblSubcategory.Categoryid=Forms!Component!cboCateg ory ORDER BY tblSubcategory.Subcategory;

Control source is bound to SubcategoryID in tblComponent.

I have set up [tblCategory] as the one side of a one to many relationship with [tblSubcategory] and [tblSubcategory] as the one side of a one to many relationship with [tblComponent]. [SubcategoryID] (foreign key) is the only piece of 'category' information I am storing in [tblComponent]. I presume that's the correct thing to do since you can calculate the category from the stored subcategoryID.

The problem is that the form only seems to remember the most recent combo choice so if i fill in one record, navigate to another use the combos again, then navigate back, the original combo choice has been overwritten in the form record (although the underlying tblComponent seems to have the correct data written to it). In other words ALL records on my form display the last values that were entered using the combo boxes and not the correct values. Is this normal? I hope not, and if not then what am I doing wrong?

Thanks in advance :)

View Replies


ADVERTISEMENT

Cascading Combo Box Changing Records

Jul 13, 2006

I have attached a Microsoft inventory db that I have attempted to alter and apply to my needs.

I added cascading combo boxes to allow the users to make selections of products specific to categories. Once the category is selected in the CategoryID combobox the cascaded combo boxes ProductName & SerialNumber become populated with the products that belong to the category selected in CategoryID. This works as it should.

The problem comes after a record is selected and an attempt to switch categories is made. For example, say an inventory transaction for the product named "V1" which belongs to the "Special" category is entered. As soon as I switch back to the "Routine" category with the combobox, the product "V1" is now associated with the "Routine" category.

I know Access is just doing what it's supposed to but I need to find out how to prevent the category information for products from changing when a new category is selected in the first combobox. I've tried requeries, gotoRecords and various other commands without luck.

I have attached my db in hopes that a solution can be reached more efficiently.

Thanks in advance.

Shane

View 6 Replies View Related

Cascading Combo Boxes Not Showing Previous Saved Records

Oct 7, 2014

I made a form for users to go back and see saved records as and when required. However my cascading combo box are not showing the saved information. Information is saved in back end.

View 5 Replies View Related

General :: Data Type Mismatch With Last Cascading Combo Box?

Aug 28, 2013

Some background: I am making a form at work for a coworker with cascading combo boxes where she can select a Customer, then Platform Description, then Period, then Year. I used VBA code for these and they all seem to be working, except the Year.

Code:
Private Sub Form_Load()
On Error Resume Next
CustomerCB.SetFocus

[Code].....

I am pulling a table from Excel into Access (SD0039DA_T2), then I have used a delete and append query to populate a 2nd table (SD0039DA_T). I did this 2nd table because the first table was slowing down all of Access because it's such a large file directly linked to Excel.

The only real difference between the two tables is I added another column to SD0039DA_T called BillingYear. This is the Year in the cascading comboboxes/listboxes I am having trouble with. In the append query, I used ...

Code:
BillingYear: Right([SD0039DA_T2]![Billing Date],4)

...appended to BillingYear. I want just the year (YYYY), not the whole billing date from the original table (MM/DD/YYYY).

So I'm thinking the problem is with the YearCB section of the VBA code or something to do with my tables?

View 3 Replies View Related

Cascading Combo Boxes - Interact And Record Selections Made In New Records Within Destination Table

Sep 12, 2012

I am trying to get a series of combo boxes to interact and record the selections made in new records within a destination table. Here is situation with respect to the tables involved:

1 table lists the names/acronyms of various research facilities and the branch to which they belong (acronym is PK)
1 table lists Financial Points of Contact for each facility (acronym is FK to relate to earlier table)
1 table lists Technical Points of Contact for each facility (acronym is FK to relate to Facility table)
1 table lists program participants and the branch they belong to (Branch in FK to relate to Facility table)

I am trying to create a form that allows me to set the participant and, from this selection, restricts the facility choices in the Facility combo box to those that fall within the branch to which the participant is assigned. I think the next step is pretty obvious too. Once the facility is selected I have combo boxes that would only display those Financial and Technical PoCs assigned to that facility.

I have watched the 4 Data Pig tutorials and I can easily make functional cascading combo boxes as long as they only refer to the look up tables. I generated perfectly functioning cascading combo boxes on a test form. How do I generate combo boxes that will then store the info selected in my destination table? Whenever I try to set a Control Source it disrupts the functioning of the queries.

View 4 Replies View Related

Navigating Combo Box

May 8, 2006

If an answer to this is out there, sorry. I haven't had luck finding anything.
I have a form with an unbound combo box. When you select an item from the box, the objects on the form and subform fill in based on the selection. The person using this would like to click arrows to navigate through the combo box. How do I do this?:confused:

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

Navigating Records In A Form Using A Filter

Feb 22, 2005

Hello,

I need to navigate through all records for a table where a <field> = a certain "string". Ideally I would have a next record button that would know to ignore records that do not meet my criteria?

Simply put,
Next available record where <field> = "string"?

Is there anyway to do this?

Regards,
Chris

View 2 Replies View Related

Navigating Records On Unbound Form With VBA

Jul 1, 2013

I have a form that reads records from a query.. It loads the first record into the form, without issue.

Code:
Sub FormLoaded()
Dim r As DAO.Recordset
Set r = CurrentDb.OpenRecordset("Results") ' Query we want
Forms("frmmainnew").lbladdUser1bad.Visible = False

[Code] ....

Now I have have 2 buttons at the bottom of the form, one for next record and another for previous record...

Code for next record

Sub NextRecordbtn()
Dim r As DAO.Recordset
Set r = CurrentDb.OpenRecordset("Results") ' Query we want
r.MoveNext
If r.EOF = True Then

[Code] ....

I know that I have 3 records that result in the query named "Results", the next record button will bring the form from record 1, to record 2... however it will not move from the 2nd to the 3rd record...

View 14 Replies View Related

Command Buttons Previous And Next Not Navigating To Records

Dec 23, 2014

I have a custom command button cmdPreviousRec and cmdNextRec for navigation, but when i click the cmdPreviousRec its not navigating to the records and the cmdNextRec is up to 2nd record only.

Code below is the i've working:

Private Sub cmdNextRec_Click()
On Error Resume Next
Set db = CurrentDb
Set rs = db.OpenRecordset("SELECT * FROM tblAMHMace")
If Not rs.EOF Then
rs.MoveNext

[Code] ....

View 5 Replies View Related

Access Forgetting How To Add?

Jan 9, 2007

Hello all. I have a problem that is really boggling me.

I have a form and a report that both use the exact same query. I sum up employee hours and the form doesn't know how to sum them up correctly. However, the report has no problem coming up with the right answer.

Both of the textboxes on the report and the form have the same setting for format (Format: Blank, Decimal Places: Auto). I thought maybe the problem was with the formatting, so I set the format for the Form as (Format: Fixed, Decimal Places: 2). And Access proves to me that it forgot how to add! Below are some screenshots. Does anyone have any idea why the same query yields one right answer, and one answer that is .5 off?

The problem can't be in the query, as it gives the right answer in the report. Also, it can't be in the formatting since the report give me a 262.00 instead of a 262.50. Any other ideas would be appreciated!

Form
http://www.freeimagehosting.net/uploads/662079a177.png


Report
http://www.freeimagehosting.net/uploads/4df8de5258.png

View 5 Replies View Related

Cascading Combo Box

Dec 7, 2005

Dear members,

I have a form with 4 Combo boxes bound to fields in 4 tables;

1) Oblast Name
2) District Name
3) Jamoat Name
4) Village Name

The selections work fine. Cascade works from Oblast to Village Name. My question is ;

Currently the ID's of the bound columns are stored in the tables instead of the corresponding data. For example for the Oblast name; I have the value "3"=" rather than "Khatlon" for District_Name, I have "223", rather than "Muminobad".

Is there way to capture the names of the respective places rather than storing ID's in the table?

Thanks in advance.

Irshad

View 9 Replies View Related

Cascading Combo & Dates

Apr 11, 2006

This is driving me a little mad, and its probably something quite simple!

I am creating a form which will allow users to narrow down their search based on criteria entered into three combo boxes.

The first combo box pop's up a calendar and is populated when the date is chosen on the calendar.
The second combo box will provide a list of systems that have a record entered on that date
The third combo box will then show a list of case id's based on the system and date selected.

I can get it working when ignoring the date, but as soon as I bring the date combo into the equation I get a data mismatch error. Now I presume that this is to do with holding a date in a text field and comparing with a date/time field in the table, so I have set both to 'short date', but still get the error.

Can anyone provide any pearls of wisdom to help stop me from going insane? (that might be a bit late tho!)

View 1 Replies View Related

Cascading Combo Boxes

Dec 12, 2006

I have a few cascading combo boxes that restricts the value of one combo box depending on what the the value of other one is.

The problem I have is that some of the data is not displayed in the combo boxes when scrolling through the records after data entry.

I have tried to re query them on the form on open event but it does not seem to help much.

Any Ideas?

thanks :)

View 9 Replies View Related

Cascading Combo Box - Assistance

Nov 4, 2007

Hello

I have a database (Access 2007) that has two tables, reports, queries and so far all seems to be working and going well. Quite impressed with it to be honest for my lack of skills.

However, I've run into a bit of trouble and need assistance getting a combo box to work with another combo box to produce list kind of thing.

The database is a vehicle database and I need the 'Vehicle' combo box to give me a list of vehicles. I then need the 'Model' combo box to produce the models of the car selected in the 'Vehicle' combo box.

Example - If I select 'Ford' from the 'Vehicle' combo box list I want all the models to be displayed in a list form thing in the 'Model' combo box so the user can easily select make and model of the car.

I have two tables:
CarMM
VD

The 'CarMM' table contains a list of around 1,500 records of car makes and models. First column has the 'Vehicle' make and the second field coloumn has the 'Model'.

The 'VD' table contains all other information like the charges, name, the make and model of car once selected in combo box.

I then have the form called 'VD'. In this form contains the combo boxes I want to be cascading.

Any advice on how to do this? I'm quite new to this so any help would be nice. Thanks you very much.

View 2 Replies View Related

Help With Cascading Combo Boxes

Jul 28, 2005

I need some help setting up my tables to allow cascading combo boxes. I need to document when a Pharmacy IV room and chemotherapy room are cleaned. Each Room requires different cleaning procedures.

Here is my table structure:
TblCleaningDuties
DutyID-Auto# (PK)
Duty - text (Example- mop floor, clean hood, wash ceiling, wash sink)
Frequency-text

TblLocation
LocationID- Auto# (PK)
Location - Text (Clean Room, Chemo Room, Anteroom)

TblCleaning
CleanID-Auto# (PK)
LocationID-(FK)
DutyID- (FK)
Date/Time
TechID


If the user selects Clean Room I don't want them to see wash sink and anything else not pertinent to the Clean Room. How do I set up the tables?
Thanks,
Jason

View 1 Replies View Related

Cascading Combo Boxes

Jun 2, 2005

Just wondering if anyone can help Im creating two combo boxes where the first one determines the values in the second one.

The tables are made up of the following;

Line

Line number (PK)
.....
....

Main Setting

Part Number (PK)
Press Line (FK)

Now ive took the advice of previous threads but im having the following error message when im creating this;

The record source 'SELECT [Main Settings].[Part Number] FROM Main AS Settings WHERE [Main Settings].[Press Line]=[Forms]![Example]![Line]' specified on this form does not exist.

I know that this doesnt exist but im typing it correctly. Access seems to be changing my statement i.e. inserting the AS command. Any help will be much appreciated

View 3 Replies View Related

Cascading Combo Box Parameter

Nov 21, 2005

I have an unbound Form with a Subform bound to a query. The query parameters are selected by the users via Unbound cboboxes. The form is working but I would like to add a feature on each cbobox that would allow to show "All" the data (ie:Show the data like if there was no parameter on that field). I can't see how to add this feature, is anybody got any idea?

View 3 Replies View Related

Cascading Combo Boxes

Jan 31, 2005

Right I have followed one of the sample databases and modified it to create cascading combo boxes like i needed.

Now all i need to do is use them in the context i need.

Basically I have country, region and sub region. These cascade to each other in the form which has been created. If you select a country, then in region you in only see the regions in that country, etc.

What i need is to be able to use the cascading combos boxes in conjunction with the "Location table". So someone can put in a project number and then use the cascading combo boxes to to chose the country, region and sub region boxes saving all of the data into the location table .

Please can someone help, as it took me allmost three hours to create the cascading combo boxes but now i cant even use them for what i wanted them for,.

Many Thanks

View 12 Replies View Related

Cascading Combo Boxes

Mar 15, 2005

Hi

I have trawled this forum searching for help with cascading combo boxes, it was very helpful but alas I need that bit more.

I have 2 combo boxes and the result is displayed in a subform. The problem is that it will only display one selection made from the Combo boxes and I need multiple selections on display in the record.

It is a parts job worksheet in a garage where multiple work is required on a vehicle. It is based on Work Type and Work Codes which then bring up the detailed description.

The first Combo Box is Work Type and this allows you to select letters. The second Combo Box is Work Code and this allows you to select numbers.

I used the example I found on here but haven't changed the field names as I daren't alter the coding until I know it will display multiple selections in the subform of the record.

I attach the database to see of anyone can help me, ppllleeeaaassssee. I woul dbe most grateful if you could make the changes and zip it back up as I ain't no VB programmer.

View 9 Replies View Related

Cascading Combo Output

May 24, 2005

Hi folks, this may seem like a silly question... but I'm rather new at this...

I have set up 4 Cascading combo boxes on a form, as per the fantastic little tutorial by SJ McAbney... They work great...

What I want them to do is output the combo box selections back to a table. I have been able to get it to do this, but all it's putting back in the table is the ID number of the combo box selection. I need to get the text there instead. I experimented with switching the column order on the form, so the text is before the ID... and that worked with the output, but messed up a number of other things.

Any suggestions??

Thanks in advance...

B

View 8 Replies View Related

4 Cascading Combo Boxes And An &lt;All&gt;???

Oct 9, 2005

i currently have 4 combo boxes that each has its own table, and setup as cascading. Now what i want to add is an <All> in each combo to box to give any results in that table.

i have

combo 1
SELECT [tblProductManufacturer].[ProductManufacturerID], [tblProductManufacturer].[ProductManufacturer]
FROM tblProductManufacturer UNION Select "<All>", "<All>" as Bogus From tblProductManufacturer
ORDER BY [tblProductManufacturer].[ProductManufacturer];


combo 2
SELECT tblProductModel.ProductModel, tblProductModel.ProductModelID
FROM tblProductModel
WHERE (((tblProductModel.ProductManufacturerID)=[Forms]![MainScreen]![MainWindow].[Form].[CboProductManufacturer])) UNION Select "<All>", "<All>" as Bogus From tblProductModel
ORDER BY tblProductModel.ProductModelID;


combo 3
SELECT [tblProductVersion].[ProductVersion], [tblProductVersion].[ProductVersionID]
FROM tblProductVersion
WHERE ((([tblProductVersion].[ProductModelID])=[Forms]![MainScreen]![MainWindow].Form.CboProductModel)) UNION Select "<All>", "<All>" as Bogus From tblProductVersion
ORDER BY [tblProductVersion].[ProductVersionID];


combo 4
SELECT [tblProductSize].[ProductSize], [tblProductSize].[ProductSizeID]
FROM tblProductSize
WHERE ((([tblProductSize].[ProductVersionID])=[Forms]![MainScreen]![MainWindow].Form.CboProductVersion)) UNION Select "<All>", "<All>" as Bogus From tblProductSize
ORDER BY [tblProductSize].[ProductSizeID];


in place of UNION Select "<All>", "<All>" i have also tried

UNION Select Null as AllChoice, "(All)" as Bogus


And in place of UNION Select "<All>", "<All>" as Bogus i have also tried

UNION select distinct null, null (And added distinct after the first Select of the query)

but to no avail????

View 7 Replies View Related

Cascading Combo + New Record Help

Jun 28, 2006

Afternoon,

I'm having a problem with a form used to display table records as well as create a new record entry.

The form has 2 combo boxes and the rest are fields.

Combo1: Artist
Combo2: Gallery

I would like it so that when the form opens and displays the first record it will also populate the two combo's with the correct details for that record. Secondly when I click to create a new record it will populate the first combo with all artists but then the second combo will populate with multiple galleries (I think because that artist might have done work with multiple galleries).

I'm a little stuck so any help would be great at this point!

:)

View 2 Replies View Related

(yet Another) Cascading Combo Box Problem

Jul 25, 2006

Im using the code from an 'older' example posted here ages ago and it works fine on other databases when there are only 3 combo boxes. This time I'm using on a total of 5.

The problem is the 3rd, 4th and 5th boxes will not requery to a null value, I've tried using DoCmd.Requery "cbo_whatever" instead of Me.cbo_whatever.Requery in case that makes a difference (as you guessed I'm not much of a code jockey :p)

So am I being a bit thick, why doesn't this work ? I've had a search on the forum and have found many examples (obviously) of cascading box examples etc. but I'm comfortable using this example and can figure out what's wrong.

Private Sub cbo_region_AfterUpdate()

If IsNull(Me.cbo_region) Then
Me.cbo_city = Null
Me.cbo_city.Enabled = False
Me.cbo_city.Locked = True
Else
Me.cbo_city.Enabled = True
Me.cbo_city.Locked = False
Me.cbo_city.Requery
End If

End Sub

Private Sub cbo_city_Afterupdate()

If IsNull(Me.cbo_city) Then
Me.cbo_building = Null
Me.cbo_building.Enabled = False
Me.cbo_building.Locked = True
Else
Me.cbo_building.Enabled = True
Me.cbo_building.Locked = False
Me.cbo_building.Requery
End If

End Sub

Private Sub cbo_building_AfterUpdate()

If IsNull(Me.cbo_building) Then
Me.cbo_floor = Null
Me.cbo_floor.Enabled = False
Me.cbo_floor.Locked = True
Else
Me.cbo_floor.Enabled = True
Me.cbo_floor.Locked = False
Me.cbo_floor.Requery
End If

End Sub

Private Sub cbo_floor_AfterUpdate()

If IsNull(Me.cbo_floor) Then
Me.cbo_room = Null
Me.cbo_room.Enabled = False
Me.cbo_room.Locked = True
Else
Me.cbo_room.Enabled = True
Me.cbo_room.Locked = False
Me.cbo_room.Requery
End If

End Sub

View 3 Replies View Related

Cascading Combo Box Behaviour

Aug 22, 2006

Hi,

I am using a form with 3 combo boxes name, weight and grade. The combo boxes are cascading:

A name is selected in the first combo box, since each name has different weights attached to it only the weights associated with that name are selected when the weight combo box is clicked. In a similar vein, there are only certian grades associated with a certain weight.

The effect is to filter the results so that an invalid entry cannot occur.

My problem is that once an entry is made and I select a new name for the next entry, the weight and grade boxes remain with the same values instead of updating to new values. Updating of the boxes does not appear to be working.

Does anyone have any ideas how to solve this problem?

Many Thanks
Turbojohn

View 2 Replies View Related

Cascading Combo Boxes

Aug 24, 2006

I have 4 Combo Boxes on my form (cmbo1, cmbo2, cmbo3, cmbo4). I have successfully managed to get the cascading down as long as the user starts with cmbo1.

What I would like to be able to do is have the user select any combo box on the form and have the rest of the boxes filter automatically, e.g., a user selects a value in cmbo2, the afterupdate would then filter/lookup the values of cmbo1, cmbo3, cmbo4 based on the value selected in cmbo2.

Is this possible and if so, does anyone know how to do this?

Thanks.

View 14 Replies View Related







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