C
ChasW
I believe i stumbled across a bug in access 2000, but I am not sure.
I was hoping somebody here might have an explanation.
I should first mention that my ac2000 is patched to sp3 and the Jet
Engine is patched to the latest version.
Using a listbox in a form with Multi Select set to Extended, the
following code works fine during the Form Open event.
With Me.List27
.RowSourceType = "Value List"
.RowSource = ">=; >; =; <=; <"
.Selected(0) = True
End With
However, if I try to use the same list box with Multi Select set to
None, then at runtime none of the controls on the form are responsive
unless I remove the above line of code:
..Selected(0) = True
Why does a regular list box not want this setting during Form Open?
Some other things I am noticing related to this:
The list box does select index 0 as expected even with Multi Select is
set to None, just that no controls work. I am only able to switch
back to design view or close access.
During the controls not responding, cpu utilization is 0 so I dont
think any processes are hanging.
If I make a command button whose on click event sets the single select
list box to select index 0, everything works fine.
So this seems to be an issue that happens with the list box set to
Multi Select None during Form Open, but not during other events.
I am merely a novice with Access / VBA so I really don't know where to
begin to correctly deal with this. I do know that the list box in
question must only allow 1 selection at a time and that default
selection really should be index 0.
Please help.
Chas
I was hoping somebody here might have an explanation.
I should first mention that my ac2000 is patched to sp3 and the Jet
Engine is patched to the latest version.
Using a listbox in a form with Multi Select set to Extended, the
following code works fine during the Form Open event.
With Me.List27
.RowSourceType = "Value List"
.RowSource = ">=; >; =; <=; <"
.Selected(0) = True
End With
However, if I try to use the same list box with Multi Select set to
None, then at runtime none of the controls on the form are responsive
unless I remove the above line of code:
..Selected(0) = True
Why does a regular list box not want this setting during Form Open?
Some other things I am noticing related to this:
The list box does select index 0 as expected even with Multi Select is
set to None, just that no controls work. I am only able to switch
back to design view or close access.
During the controls not responding, cpu utilization is 0 so I dont
think any processes are hanging.
If I make a command button whose on click event sets the single select
list box to select index 0, everything works fine.
So this seems to be an issue that happens with the list box set to
Multi Select None during Form Open, but not during other events.
I am merely a novice with Access / VBA so I really don't know where to
begin to correctly deal with this. I do know that the list box in
question must only allow 1 selection at a time and that default
selection really should be index 0.
Please help.
Chas