Solved how to solve the cascaded combo boxes issue in continuous form

owner

New member
Local time
Today, 05:06
Joined
Aug 12, 2020
Messages
6
Dear All,

I have a challenge with cascaded combo boxes when using it in continuous access form that if i have 2 or more combo boxes that are based on each other when navigating from record to record that belongs to another category the previous records disappeared i read a lot of cases on the internet but i couldn't found a perfect solution for that issue and this is so weird that Microsoft knows that problem and did not introduce solution along with all access generations
i attached herewith a sample database that i face that issue in form FrmInvoices, when navigating between records no. 48, 49 and 50 in the master form the subform combo box values disappeared

FrmInvoicesEGP.PNG

FrmInvoicesUSD.PNG


can any one help by explaining the main logic of that error, why Microsoft didn't solve that issue and what is the workaround that can solve that challenge

and all appreciation to your kind support
 

Attachments

Hi. Welcome to AWF!

Since you are using a Form (rather than a Datasheet), one of the most common approach is to overlay a bound Textbox on top of your Combobox to display the actual data in that field. The Combobox is only used for selecting it. Maybe check out the "similar threads" links at the bottom of this page for a possible demo. If you don't find any, I'll try to find one for you.
 
Hmm, so I added a...

Me.ServiceID.Requery

...to the On_Current event of the Subform and it appears to do what you want. That said, I would use tables to hold combo box values instead of Value Lists. If you ever need to make a change it's easier to add to a table then to keep going into deign mode.
 
I attached a sample that shows the method for a continuous form but it won't work on a ds form.
 

Attachments

Hmm, so I added a...

Me.ServiceID.Requery

...to the On_Current event of the Subform and it appears to do what you want. That said, I would use tables to hold combo box values instead of Value Lists. If you ever need to make a change it's easier to add to a table then to keep going into deign mode.

too great... it is working fine(y)
however, i'd like to ask is that the same solution when we use more than 2 cascaded comboboxes in normal continuous form - i mean not like my case as master single form with details continuous form - to use the same On_Current event of the continuous form to use as follow
Me.ComboBox1.Requery
Me.ComboBox2.Requery
Me.ComboBox3.Requery
 
Well, not usual to have that many combo boxes dependent on the main Form. So, I've never tried that many requeries. All I can say is try it.
 
see the example in to link I provided - that has three cascading combo's. Note if you go back to the first one and change it, it will reset the other two because the third one references the second one and if the second one has changed, chances are the third one would then be invalid
 

Users who are viewing this thread

Back
Top Bottom