Displaying selected fields in a List based on a combobox issue (1 Viewer)

bmaccess

Member
Local time
Yesterday, 23:10
Joined
Mar 4, 2016
Messages
78
Hi there.

This is my form details.

I need to show only the Names of learners selected from a specific based on the selection in the combobox named cmbGradeSelect.

But when I run it I get a blank List

When I hardcode it with “1A” I get the correct result. I think I have some reference issue to the combobox.

Anybody can see what code I must change please.

Thanks

Listbox
1695414527007.png




1695414569622.png



1695414601560.png
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 01:10
Joined
Feb 28, 2001
Messages
27,186
Which column counts as the bound column of the combo box? Because that is the value returned for a combo from which a selection was made. Note also that the combo box columns are zero-based, i.e. start numbering from zero.
 

cheekybuddha

AWF VIP
Local time
Today, 07:10
Joined
Jul 21, 2014
Messages
2,280
Underneath the existing criteria, in the 'or:' line, try putting:
[Forms]![frmLearnerBaseDetails]![cmbGradeSelect] IS NULL
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 23:10
Joined
Aug 30, 2003
Messages
36,125
You haven't shown your code, but make sure you are requerying the listbox in the after update event of the combo box.
 

bmaccess

Member
Local time
Yesterday, 23:10
Joined
Mar 4, 2016
Messages
78
Underneath the existing criteria, in the 'or:' line, try putting:
[Forms]![frmLearnerBaseDetails]![cmbGradeSelect] IS NULL
Hi there. Thanks for the suggestion of the IS Null. It does bring up the records in the List box but my actual fault was that I did not requery my List Box in the After Event of my combobox selection.
 

bmaccess

Member
Local time
Yesterday, 23:10
Joined
Mar 4, 2016
Messages
78
You haven't shown your code, but make sure you are requerying the listbox in the after update event of the combo box.
Hi there. Thanks for your suggestion.You were spot on with the requery of the listbox in the after update event. I was about to give up and try the requery and it works. At first I was not sure where to requery. But after a few tries. I realise I must List45.requery in the after update in the combobox and it works brilliantly. Thanks once again .
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 23:10
Joined
Aug 30, 2003
Messages
36,125
Hi there. Thanks for your suggestion.You were spot on with the requery of the listbox in the after update event. I was about to give up and try the requery and it works. At first I was not sure where to requery. But after a few tries. I realise I must List45.requery in the after update in the combobox and it works brilliantly. Thanks once again .

Happy to help!
 

Users who are viewing this thread

Top Bottom