Solved Multi select issue after implementation cascading combobox (1 Viewer)

ahmad_rmh

Member
Local time
Today, 03:15
Joined
Jun 26, 2022
Messages
243
My datasheet form check box selection is working normal before filter of data but as I filter data through cascading combo boxes the datasheet check box is not making multiple selections.

kindly suggest the solution.

The db file is attached herewith.
 

Attachments

  • Cascading Combo-Check Multiple Selection.accdb
    1.3 MB · Views: 89

CJ_London

Super Moderator
Staff member
Local time
Today, 01:15
Joined
Feb 19, 2013
Messages
16,616
the solution is to put the code in your subform current event in the combo after update events instead. No code required in the subform
 
Last edited:

ahmad_rmh

Member
Local time
Today, 03:15
Joined
Jun 26, 2022
Messages
243
the solution is to put the code in your subform current event in the combo after update events instead. No code required in the subform
but how I will apply filter in datasheet form with each combo box.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 01:15
Joined
Feb 19, 2013
Messages
16,616
You assign the sql using

mysubformname.form.Recordsource = “select….”

no need for the requery
 

ahmad_rmh

Member
Local time
Today, 03:15
Joined
Jun 26, 2022
Messages
243
the solution is to put the code in your subform current event in the combo after update events instead. No code required in the subform

Thanks CJ, 🌹 ❤️ 🌹 got the solution as you had given the hint.

The solved db file has been attached herewith.
 

Attachments

  • Cascading Combo-Check Multiple Selection.accdb
    996 KB · Views: 68
Last edited:

CJ_London

Super Moderator
Staff member
Local time
Today, 01:15
Joined
Feb 19, 2013
Messages
16,616
I don't believe in providing a full solution except occasionally to a complete newbie OP. I prefer to show 'how to fish', rather than providing the fish.
 

ahmad_rmh

Member
Local time
Today, 03:15
Joined
Jun 26, 2022
Messages
243
I don't believe in providing a full solution except occasionally to a complete newbie OP. I prefer to show 'how to fish', rather than providing the fish.

Yep, as you commented " how to fish", it's improving my skills.
 

CarlettoFed

Member
Local time
Today, 02:15
Joined
Jun 10, 2020
Messages
119
The first thing to do is learn how to manage the properties of the various table fields and in particular:
  • Size (if the type is Text, don't always leave 255 set (this is to limit data entry to what is strictly necessary)
  • Required (if set to yes, it does not allow saving the record if the requested data has not been entered)
  • Allow zero length (must be set to No if data is always required)
  • Indexed (set to "Yes (no duplicates allowed)" when you want a field value not to be entered more than once and therefore unique
  • Index Management
Control, beyond the ID field, to avoid duplication of records because before moving on to creating the forms and then any reports, it is necessary to have a definitive efficient database structure.
In the attachment you will find a version where you can filter by Category even if you have not selected any Entity and a cleaner code.
 

Attachments

  • Cascading Combo-Check Multiple Selection.zip
    84.7 KB · Views: 89

ahmad_rmh

Member
Local time
Today, 03:15
Joined
Jun 26, 2022
Messages
243
The first thing to do is learn how to manage the properties of the various table fields and in particular:
  • Size (if the type is Text, don't always leave 255 set (this is to limit data entry to what is strictly necessary)
  • Required (if set to yes, it does not allow saving the record if the requested data has not been entered)
  • Allow zero length (must be set to No if data is always required)
  • Indexed (set to "Yes (no duplicates allowed)" when you want a field value not to be entered more than once and therefore unique
  • Index Management
Control, beyond the ID field, to avoid duplication of records because before moving on to creating the forms and then any reports, it is necessary to have a definitive efficient database structure.
In the attachment you will find a version where you can filter by Category even if you have not selected any Entity and a cleaner code.

Thanks Carletto, got the idea through query reference.
 

Users who are viewing this thread

Top Bottom