As always, unsure whether to post this under Access or VBA, but here goes.
The VBA code I have attached to the NotInList event of a combo box does all the right things except collapse the combo box on completion. The code I’m using is as follows (I have condensed the message for easy reading):
MsgBox “The text you have entered is not in the list. Please check the spelling or create a new item.”, vbOKOnly + VBInformation, “Not Found”
Me!cmbIssue.undo
Response = acDataErrContinue
This results in the previously-displayed entry being re-selected, but the combo box remains dropped down, regardless of the sequence of the three lines of code. I would like to have the dropdown collapse at the end of the subroutine. I have tried setting the focus to another field, which works, but I want the combo box to remain selected. If I set the focus to another field, then back to the combo box, it is dropped down again. Yet, if my OnCurrent code sets the focus to the combo box as I move from record to record, the dropdown isn’t activated and the combo box remains collapsed.
I know there is a Dropdown method to drop down the combo list, but cannot find a means of reversing this process.
Any ideas?
Thanks in anticipation…
AliC
:confused: