473,403 Members | 2,270 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

How to update a record with value from cascading combo box?

167 100+
Hello, I hope I can do a good enough job trying to explain this situation!

I have inherited the maintenance for an access database and I have been requested to make a change to a form to add 2 combo boxes. I am encountering problems with getting the data value from one of the combo boxes (for divisions and groups) to be updated on the record.

THE FORM:
frmHardware
form property record source: HWInventory table (has columns for the division and group on each inventory row of data)

THE COMBO BOXES:
CmboDivisions

Control source property: Division column (on HWInventory table)
Row Source property: SELECT DivisionName FROM DDDivision ORDER BY DivisionName;
After Update event: cmboGroup.RowSource = "SELECT Division_group FROM division_groups WHERE Division_groups.DivisionName= '" & cmboDivision.value & "'"
* Once the division is chosen, the event code is intended to poplulate the group list box with the valid values for the chosen division.
* The HWInventory record is updated successfully with the division value in the combo box.

CmboGroups
Control source property: Div_group column (on HWInventory table)
Row Source property: left blank
Problem:
* Once the group is chosen, it is populated in the group combo box.
*A value will be selected from the list of groups in the combo box.
*The HWInventory record is NOT updated successfully with the value from the group combo box.

Note: The way this form seems to be designed is a change can be made for any column but to save the change, they have to click on a bar on the left side of the form that shows a ‘pencil’. I have never seen or used this method before. I normally control updates and additions with command buttons on the form. There are no update statements in any of the code for the form so I am assuming that the HWInventory record update is based on the control/row source values defined for each of the text boxes and list or combo boxes on the form.

With that, I am thinking that the division combo box updates correctly on the record because the rowsource has a specific value (the select statement). Maybe the group is not being updated because I have the rowsource as a blank value as I am using the ‘after update’ event to build the rowsource for the group.

Any suggestions would be greatly appreciated!!!
Feb 3 '11 #1
1 3220
NeoPa
32,556 Expert Mod 16PB
Check out Cascaded Form Filtering.
Feb 3 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
Rabbit
by: Rabbit | last post by:
Cascading Combo/List Boxes This tutorial is to guide you in the creation of Cascading combo/list boxes. That is when you have multiple combo/list boxes where the selection of an option in one...
2
by: ShadowHawk | last post by:
Hi Everyone. I've been having a little touble with a form I'm working on. (I'm a MS Access hobbiest). I've set up the cascading combo boxes, which is working, (I took the code from Microsoft) on a...
3
klarae99
by: klarae99 | last post by:
Hello, I am using Access 2003 to design an inventory database. Please be pacient with this question, I am not sure how exactly to explain what is happening concisely but I will do my best. I...
1
by: gdixon | last post by:
Greetings To All! I am using a Access 2003 and my programing skills are of the cut and paste variety. This means begining programming skills and on a good day perhaps middle of the road...
1
kcdoell
by: kcdoell | last post by:
Good Morning: I have a form where I am trying to create cascading combo boxes. I have done this before but I am getting the following error that is throwing me off: Procedure declaration...
12
by: azalea45 | last post by:
Hi all I am a newbie when it comes to access. My company requires that all Databases run on the company SQL back-end as a result i have a Access project that connects to the server. I have two...
7
by: Toireasa | last post by:
Hi, Newbie Access developer here, and my first post on this forum, so I might not get everything right - thanks in advance for your help and your patience! I'm using Access 2007, in XP. I'm...
1
by: bluclouds9 | last post by:
I am new to Access and have been charged with creating a database for our course alumni. I currently have a "Contacts" form and am trying to create a subform to hold the course alumni...
3
by: MOCaseA | last post by:
I have a record lookup form that has several combo box filters set up. However I noticed a slight problem. The filters are working correctly, but there are now over 2000 entries and when filtering...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.