Mr Clevver
Idiot Savant
- Local time
- Today, 18:10
- Joined
- Jun 26, 2008
- Messages
- 17
Hi all (again),
I have another small issue that, hopefully, should be as simple to resolve as the last one.
I have a form which contains a list box (list20), and two buttons. The first button (add/edit), when clicked, opens a form which either displays the data for the item selected in the list or if no item is selected opens the form blank, to enter a new record. The second button (clear selection) clears the list selection using the code:
My problem is that clearing the list in the way does not seem to clear the value Access has stored against this list selection behind the scenes. Meaning that if I select the first item in the list, click the clear button, then click add/edit - instead of getting the form to enter a new record I instead get the form displaying the first record (despite it now not being selected).
Is there possibly a line of code I can use to clear this saved value?
I hope that's clear.
I have another small issue that, hopefully, should be as simple to resolve as the last one.
I have a form which contains a list box (list20), and two buttons. The first button (add/edit), when clicked, opens a form which either displays the data for the item selected in the list or if no item is selected opens the form blank, to enter a new record. The second button (clear selection) clears the list selection using the code:
Code:
Dim i As Integer
For i = 0 To List20.ListCount - 1
Me.List20.Selected(i) = False
Next i
Is there possibly a line of code I can use to clear this saved value?
I hope that's clear.