473,735 Members | 2,072 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 cboSubCategorie s are repopulated correctly.

I hope that's somewhat clear . . .

Here's the code from the form:

Private Sub cboCategory_Cha nge()

CurrentDb.Query Defs("qryGetSub CategoryByCateg ory").SQL = "EXEC
getCategoryByCa tegory" & Me.categoryId

Me.cboSubCatego ry.Requery
End Sub

Private Sub Form_Current()

CurrentDb.Query Defs("qryGetSub CategoryByCateg ory").SQL = "EXEC
getCategoryByCa tegory" & Me.categoryId

Me.cboSubCatego ry.Requery
End Sub

Sure would appreciate any help.

Oct 4 '06 #1
2 2645
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 cboSubCategorie s are repopulated correctly.

I hope that's somewhat clear . . .

Here's the code from the form:

Private Sub cboCategory_Cha nge()

CurrentDb.Query Defs("qryGetSub CategoryByCateg ory").SQL = "EXEC
getCategoryByCa tegory" & Me.categoryId

Me.cboSubCatego ry.Requery
End Sub

Private Sub Form_Current()

CurrentDb.Query Defs("qryGetSub CategoryByCateg ory").SQL = "EXEC
getCategoryByCa tegory" & Me.categoryId

Me.cboSubCatego ry.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
9369
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 clause after users typed in one or several letters/digits. My problem is as follows Most of the time I need to display form in continuous format, that means the combo box will appear in each record. For example I have a form to let users view...
3
10368
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 problem though. I'm looking to be able to sort multiple fields from a form whose record source is a query of fields from a single table. Background: The default view is "Continuous Forms." and in the Form Header section of the form's design, I...
6
4628
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 user and I would like to change the whole process. I would like to duplicate the layout of my form... but each field becomes a simple "searching" ListBox. On completing any one search field all the rest are filtered to this value. Subsequent...
11
4532
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 database,just help in getting me pointed in the right direction. I have a database with 8 tables, which from what I have read, cannot be linked on a single form, and be updatable. I have created a query which includes all 8 tables, and then...
1
1871
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 (((.Material)=Forms!Formulas!.Form!Raw)); Lets just say the continuous form has 8 items in it...... The FIRST time I select any one of the "Lot" combo boxes, it populates
9
6761
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 second combo to change depending on what values the user selects in the first box, it's just that every time the user changes the first combobox, the second combobox FOR EVERY RECORD goes blank.
0
2927
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 lot of time trying to figure it out, over the years. It finally dawned on me a couple of weeks ago how to do this. A couple of notes: 1) This is written for a different audience than CDMA; it's written for
8
14789
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 entries, Table2 stores only the extra info relevant to items that are TYPEA, Table3 stores only the extra info relevant to items that are TYPEB, and so on. All relationships are setup (one-to-one) between the main table (Table1) and all the other...
4
2464
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 an easy way to assign one or multiple lessons to a student. tbl_Students
0
8964
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
8786
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9463
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9327
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9200
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4562
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4823
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3274
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2190
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.