Yet another MS Access question
AsSiMiLaTeD
Posts: 11,728
So I've built a form with two combo boxes. The options available in box 2 are based on the selection made in box one - so for example Polk Audio would be one of the choices in box 2 if speakers had been selected in box 1, but if power tools were selected in box 1 then Crasftman would be an option.
So I got that part working ok. here comes the delimna:
Let's say I make a choice in box 1, and then move to box 2, but then decided I want to go back and modify the selection in box 1. When I do that, the options in box 2 don't change, they stick with whatever the first selection in box 1 was.
Does that make sense - can anyone help?
So I got that part working ok. here comes the delimna:
Let's say I make a choice in box 1, and then move to box 2, but then decided I want to go back and modify the selection in box 1. When I do that, the options in box 2 don't change, they stick with whatever the first selection in box 1 was.
Does that make sense - can anyone help?
Post edited by AsSiMiLaTeD on
Comments
-
I should also clarify, these fields are in a form with a bunch of other data, so reloading the entire form isn't going to be an option.
-
What are using to make the forms? VBA? You have to handle the selection changed event. Not sure as I don't do anything inside the DB application, only with Visual Studio, but I hope that helps you in the right direction.
-
Yep, you'll basically just need to place some code in the Change of Click event of the combobox to either fill up or refresh the other combo box's data.Speakers: Polk LSi15
Pre: Adcom GFP-750 with HT Bypass
Amp: Pass Labs X-150
CD/DVD Player: Classe CDP-10
Interconnects: MIT Shortgun S3 Pro XLR
Speaker cables: MIT MH-750 bi-wire
TT:Micro Seiki DD-35
Cartridge:Denon DL-160
Phono Pre:PS Audio GCPH -
This is all built in Access, I'm not using VBA to build any of it.
-
I may just have to scrap the whole thing, I just don't think there's a way to do this in Access. I really don't even understand the reason I'm having the issue...
-
Access has VBA built-in, and it's very common to have to process and respond to events when building any useful form. Access handles most of these tasks for you but there's times when you need further control.
As you are designing the form, click View=>Properties. There should be an "events" tab and you can create code in the "Change" or "Click" event.
good luck.Speakers: Polk LSi15
Pre: Adcom GFP-750 with HT Bypass
Amp: Pass Labs X-150
CD/DVD Player: Classe CDP-10
Interconnects: MIT Shortgun S3 Pro XLR
Speaker cables: MIT MH-750 bi-wire
TT:Micro Seiki DD-35
Cartridge:Denon DL-160
Phono Pre:PS Audio GCPH -
Oh yeah, I got all that, just didn't know the code to actually refresh it.
I got it figured out though, I just had to had a [second box].requery command to the get focus and load events of the second box...
Thanks