MajP
You've got your good things, and you've got mine.
- Local time
- Today, 18:26
- Joined
- May 21, 2018
- Messages
- 9,445
One more fix. You keep on discovering things, I had not thought about.
The FAYT works by using the recordset property of the combobox. This is what allows me to make a generic class without having to work with the SQL string. What is interesting is that the recordset sometimes does not exist until you actually pull down the combobox choices. That is why I had this code originally.
This will force the recordset to load. You demonstrated a similar problem. You change the rowsource and even requery; however the recordset is still the old recordset. So, i simply need to force the recordset to load by making the if then less restrictive.
Please change to
The FAYT works by using the recordset property of the combobox. This is what allows me to make a generic class without having to work with the SQL string. What is interesting is that the recordset sometimes does not exist until you actually pull down the combobox choices. That is why I had this code originally.
Code:
If mCombo.Recordset Is Nothing And Not mCombo.RowSource = "" Then
Set rs = CurrentDb.OpenRecordset(TheComboBox.RowSource)
Set mCombo.Recordset = rs
End If
This will force the recordset to load. You demonstrated a similar problem. You change the rowsource and even requery; however the recordset is still the old recordset. So, i simply need to force the recordset to load by making the if then less restrictive.
Please change to
Code:
If not mCombo.RowSource = "" Then
Set rs = CurrentDb.OpenRecordset(TheComboBox.RowSource)
Set mCombo.Recordset = rs
End If