473,386 Members | 1,710 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,386 software developers and data experts.

Problem with combo boxes

I am having a problem working with one combo box that is filtering
another combo box.

My table is tblResearch. There are two field in this table; one
is[StudyCategory] and the other [Study]. I have a form called
frmResearch on which there are two combo boxes. The control source
for the first combo box [cbxCategory] is the field StudyCategory. The
control source for the 2nd combo box, [cbxStudy] is the field Study
and it's row source is a query called qrySelect. qrySelect selects
all studies where the category = cbxCategory from a table called
luStudies. When cbxCategory is updated, cbxStudy is requeried.

All works well unless the user decides that they want to delete what
they have entered into these boxes and leave it as blank. When they do
this (by highlighting the option in cbxCategory and pressing delete)
the update event requeries cbxStudy and it becomes blank as well.
This gives the user the impression that they have now deleted anything
that is in the underlying table. This is true for the StudyCategory
field, but the Study field retains whatever data they had previously
chosen.

How can I get the table get rid of the data in the field Study if the
user chooses to do the above?
Nov 13 '05 #1
1 1451
D Perron wrote:
I am having a problem working with one combo box that is filtering
another combo box.

My table is tblResearch. There are two field in this table; one
is[StudyCategory] and the other [Study]. I have a form called
frmResearch on which there are two combo boxes. The control source
for the first combo box [cbxCategory] is the field StudyCategory. The
control source for the 2nd combo box, [cbxStudy] is the field Study
and it's row source is a query called qrySelect. qrySelect selects
all studies where the category = cbxCategory from a table called
luStudies. When cbxCategory is updated, cbxStudy is requeried.

All works well unless the user decides that they want to delete what
they have entered into these boxes and leave it as blank. When they do
this (by highlighting the option in cbxCategory and pressing delete)
the update event requeries cbxStudy and it becomes blank as well.
This gives the user the impression that they have now deleted anything
that is in the underlying table. This is true for the StudyCategory
field, but the Study field retains whatever data they had previously
chosen.

How can I get the table get rid of the data in the field Study if the
user chooses to do the above?


In the AfterUpdate event of the primary combo you could enter something like
If IsNull(Me.PrimaryCombo) Then
Me.SecondaryCombo = Null
ENdif
Me.SecondaryCombo.Requery

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Krisa | last post by:
Hello all, I just discovered something (stop me if you've heard this before....) that was causing me a significant performance hit when opening a form with subforms. To speed up loading the...
0
by: Aravind | last post by:
Hi folks. I am using Access 97. I have a form, frmHistory, which has 2 combo boxes (cboSelectTitle and cboSelectName) and 2 text boxes (Title and MemName). When the form is opened, it displays...
4
by: meganrobertson22 | last post by:
Hi Everyone- I have a question about how to add and then use the "All" selection in a combo box. I am trying to figure out how to: (1) add "All" as a selection to a combo box and then (2)...
4
by: John Tyce | last post by:
The problem that I am now having, involves refreshing controls. I have allot of text boxes, several combo boxes and grids. These controls are showing live data from an Oracle database. I have dates...
3
by: prakashsurya | last post by:
Hi i am having a small problem with combo boxes actually i am preparing a form in which i have to go through the experience in years for that i am using 4 combo boxes. on the first two combo...
1
by: Dave | last post by:
Hello all, First I'd like to apologize...This post was meant to be put in my previous post, but I tried many times without success to reply within my previous post. Now here goes... I have a...
2
by: Dave | last post by:
I have 3 tables of information feeding into 4 combo boxes on my main form (DR Form). I have as many list boxes (acting as text boxes) as there are fields in each one of the 3 tables. Once...
2
by: biganthony via AccessMonster.com | last post by:
Hi, I decided to install Office 2003 Service Pack 3 on my home computer to test (in full knowledge that there may be some issues with it). After installation, I have noticed that with a small...
3
by: =?Utf-8?B?Y2RtdW5veg==?= | last post by:
I have created a sub routine to programmatically add an indefinite number of combo boxes to a form. The combo boxes are bound in code to a view for displaying the available options. This routine...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.