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

Multiple combo boxes on Continuous Form

I have a Continuous Form based on the following table:

sku, description, categoryId, subCategoryId

I restrict the initial dataset to include one value for categoryId, but
it may include differing valuse for subCategoryId. The user needs to
be able to modify either Category or SubCategory.

I have placed two combo boxes on the form, they are query based and
linked to the two Id columns. The cboCategory displays category names
and updates the categoryId column, and works fine. The cboSubCategory
is linked to subCategoryId, and also works fine.

The problem that I am having is purely in the way the form appears
after data values are changed.

When the category changes I redefine the query that cboSubCategory is
based on and refresh the control. This allows the user to pick the
appropriate value. I am also redefining this query and refreshing in
the Form_Current event.

The data is such that subCategoryId's are unique.

The problems that I am encountering are that when cboCategory is
changed, all rows of cboSubCategory are blanked. When selecting
cboCategory on another row, where all entries are of the initial value,
all the cboSubCategories are repopulated correctly.

I hope that's somewhat clear . . .

Here's the code from the form:

Private Sub cboCategory_Change()

CurrentDb.QueryDefs("qryGetSubCategoryByCategory") .SQL = "EXEC
getCategoryByCategory" & Me.categoryId

Me.cboSubCategory.Requery
End Sub

Private Sub Form_Current()

CurrentDb.QueryDefs("qryGetSubCategoryByCategory") .SQL = "EXEC
getCategoryByCategory" & Me.categoryId

Me.cboSubCategory.Requery
End Sub

Sure would appreciate any help.

Oct 4 '06 #1
2 2623
I have a Continuous Form based on the following table:
>
sku, description, categoryId, subCategoryId

I restrict the initial dataset to include one value for categoryId, but
it may include differing valuse for subCategoryId. The user needs to
be able to modify either Category or SubCategory.

I have placed two combo boxes on the form, they are query based and
linked to the two Id columns. The cboCategory displays category names
and updates the categoryId column, and works fine. The cboSubCategory
is linked to subCategoryId, and also works fine.

The problem that I am having is purely in the way the form appears
after data values are changed.

When the category changes I redefine the query that cboSubCategory is
based on and refresh the control. This allows the user to pick the
appropriate value. I am also redefining this query and refreshing in
the Form_Current event.

The data is such that subCategoryId's are unique.

The problems that I am encountering are that when cboCategory is
changed, all rows of cboSubCategory are blanked. When selecting
cboCategory on another row, where all entries are of the initial value,
all the cboSubCategories are repopulated correctly.

I hope that's somewhat clear . . .

Here's the code from the form:

Private Sub cboCategory_Change()

CurrentDb.QueryDefs("qryGetSubCategoryByCategory") .SQL = "EXEC
getCategoryByCategory" & Me.categoryId

Me.cboSubCategory.Requery
End Sub

Private Sub Form_Current()

CurrentDb.QueryDefs("qryGetSubCategoryByCategory") .SQL = "EXEC
getCategoryByCategory" & Me.categoryId

Me.cboSubCategory.Requery
End Sub

Sure would appreciate any help.
The article at the following link explains it quite well and describes
a workaround:

http://www.fmsinc.com/free/newtips/a...ccesstip16.asp

HTH,
Bruce

Oct 5 '06 #2
Thanks for the info. Their workaround is OK, just not what the user
asked for.

Looks like the choice of Access for this job was the wrong one.

Oct 6 '06 #3

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

Similar topics

3
by: B | last post by:
I know there are several ways to speed up combo boxes and form loading. Most of the solutions leave rowsource of the combo box blank and set the rowsource to a saved query or an SQL with a where...
3
by: rquinnan | last post by:
Good Evening all, I would greatly appreciate any assistance on this Access 2003 quandary I'm in. And I do apologize if this has been answered somewhere else, I didn't see one that addressed my...
6
by: Ralph2 | last post by:
Some time ago with a lot of help from this group I made a reasonably successful database to keep track of our shop drawings. However the searching mechanism is too complicated for the occasional...
11
by: dskillingstad | last post by:
I've been struggling with this problem for some time and have tried multiple solutions with no luck. Let me start with, I'm a novice at Access and I'm not looking for someones help to design my...
1
by: dhowell | last post by:
I have a continuous form which has two combo box contols on in "Lot" and "Raw". The Row Source property of "Lot" is a Select statement based on "Raw". SELECT .lot FROM WHERE...
9
by: Edwinah63 | last post by:
Hi everyone, Please let there be someone out there who can help. I have two BOUND combo boxes on a continuous form, the second being dependent on the first. I have no problem getting the...
0
by: Jeremy Wallace | last post by:
Folks, Here's a write-up I did for our developer wiki. I don't know if the whole rest of the world has already figured out how to do this, but I hadn't ever seen it implemented, and had spent a...
8
by: fonzie | last post by:
Is it possible to have a data entry form where the information is stored in several different tables (5 or 6)? I have an inventory database where Table1 stores all of the data common to all...
4
by: Dave White | last post by:
Hello Everyone, I have created two tables to track my students' lessons. Each student is responsible for most, but not all. of the lessons. I've tried a junction table but I can't figure out...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.