472,101 Members | 1,478 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Cascading Combo Box Requery Issue

klarae99
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 have a form bound to my products table that has two cascading combo boxes, one for category and one for subcategory. When entering a new item these combo boxes cascade correctly and the data is stored in my table. However, when I go back to edit existing records I am encountering an issue. For Example; If I view the records for a specific vendor there are many items, potentially in different categories. As I scroll through the items only one category has visable subcategory information. For Example; All the items with the category Clothing have their subcategory visable but items in category Jewelry have a blank field for the subcategory. If I reselect jewelry from the category combo box of that record the subcategory becomes visable. As I scroll through the records now only those items in category Jewelry show their subcategories. I would like to view the subcategory for every record without having to reselect the category.

My current though is that I need to requery when I view a new record. My issue is that I have no idea which event that would be, and I'm not sure which box (or would it be the form?) that I would have to place the event on.

Any advice or pointers on this would be appreciated. If you need any additional information about the specifics of my set-up just let me know and I can post them. Thanks for all your help!
Nov 14 '07 #1
3 3111
Rabbit
12,516 Expert Mod 8TB
Whatever code you're using to cascade the comboboxes also needs to go into the Current event of the form. The Current event triggers when you change which record you're on. But when you change records, your value in your main category changes. However, this does not trigger your original cascading code. So you have to place it in your Current event as well.
Nov 14 '07 #2
Rabbit:

Thanks! That was exactly the information that I needed. It works beautifully now! I really appreciate the help!
Nov 15 '07 #3
Rabbit
12,516 Expert Mod 8TB
Not a problem, good luck.
Nov 15 '07 #4

Post your reply

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

Similar topics

6 posts views Thread by visionstate | last post: by
reply views Thread by leo001 | last post: by

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.