chrisjames25
Registered User.
- Local time
- Today, 21:57
- Joined
- Dec 1, 2014
- Messages
- 404
Hi
I have a main form which has a subform. As i choose from combo boxes in main form the subform is filtered to less inputs based on my selection.
The criteria i am using in the query design is "Like "*" & [forms]![Frm_genusAdd]![Cbo_Tier1]"
Works great most the time, however the combobox first column is an unique id. The issue is if I choose something with unique id 5 it will also keep in the filter unique id 15 also and 25,35,45 etc.
I tried removing the "like * &" at start of criteria but then I get nothing appear in the subform. I then tried adding an Or is null but again form populates no data.
My workaround is to have afterupdate event of cbo to pass string from the second column in the cbo to a txt box and also add a criteria for that too - ""Like "*" & [forms]![Frm_genusAdd]![Txt_Tier1]". This works but i'm assuming a better way to do this.
Apologies if explained really badly.
I have a main form which has a subform. As i choose from combo boxes in main form the subform is filtered to less inputs based on my selection.
The criteria i am using in the query design is "Like "*" & [forms]![Frm_genusAdd]![Cbo_Tier1]"
Works great most the time, however the combobox first column is an unique id. The issue is if I choose something with unique id 5 it will also keep in the filter unique id 15 also and 25,35,45 etc.
I tried removing the "like * &" at start of criteria but then I get nothing appear in the subform. I then tried adding an Or is null but again form populates no data.
My workaround is to have afterupdate event of cbo to pass string from the second column in the cbo to a txt box and also add a criteria for that too - ""Like "*" & [forms]![Frm_genusAdd]![Txt_Tier1]". This works but i'm assuming a better way to do this.
Apologies if explained really badly.