If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Cancelling a selection in an unbound listbox
Cancel = True
The above statement simply cancels the BeforeUpdate event, thereby preventing the control from losing focus or from the choice causing an update to the listbox's value. It will not prevent you from selecting another item in the listbox, although that item might cause the "Cancel" to occur, and still keep you locked in the listbox. Tell us what you're trying to accomplish with your form and listbox. Then we may be able to suggest other ways to accomplish that purpose. -- Ken Snell MS ACCESS MVP "justme0010" wrote in message ... I have tried to prevent certain changes in an unbound listbox control with the statement "Cancel = True" in the BeforeUpdate event, but that doesnt seem to work. I have a single-selection listbox and all that seems to do is not allow me to change focus to another control. I am still able to make other selections in the listbox. In a certain situation, I am trying to prevent the highlighting of a different item in the listbox. Is there any way I can do that? -- justme0010 |
#2
|
|||
|
|||
Cancelling a selection in an unbound listbox
I have tried to prevent certain changes in an unbound listbox control with the statement "Cancel = True" in the BeforeUpdate event, but that doesnt seem to work. I have a single-selection listbox and all that seems to do is not allow me to change focus to another control. I am still able to make other selections in the listbox. In a certain situation, I am trying to prevent the highlighting of a different item in the listbox. Is there any way I can do that?
|
Thread Tools | |
Display Modes | |
|
|