Selection in the drop-down list corresponding to criterion (2)

Superpat

Member
Local time
Today, 10:47
Joined
Aug 15, 2020
Messages
121
Hello,
arnelgp made me a great code for, when I select a name in a list, On another list, the selection only gives me part of the corresponding list. (see code of t_SousCat).
I want to do the same thing with the t_CompleteNouveau form but I'm doing it wrong and I can't.
Could you redo this part of the code for me.
Thanks for your help.

Liste1.jpg
Liste2.jpg
 

Attachments

no code is needed.
combo2's query looks at combo1

select field1 from table where [category]=forms!fMyForm!combo1

but you do need to refresh combo2 when the user picks combo1:

Code:
sub combo1_afterupdate()
  combo2.requery
end sub

OK, 1 line of code.
 
you need to create the query as advised on post#2.
i already made it (r_SousCat) and use it as the
rowsource of the lst_CategoriesSousCat listbox.
 

Attachments

Thank you both very much for your invaluable help. (y)
I answer after a certain delay because I try to understand the process, even for a few lines of code I spend a lot of time.
I saw, among other things, that there was a query created, a modified text zone as well as the linked columns and the column widths.
On my own, I certainly couldn't have done this.
Your help allows me to move forward in my little project.
 

Users who are viewing this thread

Back
Top Bottom