Full Version: Allow Edits NO but still use listbox
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
detrie
Hi All,

I have a form with many contols including an unbound listbox.
I have set the form property settings to allow edits "No"
I have a added a comand button that allows edits Me.AllowEdits = True
My problem is I would like to use the Listbox to select and view different records and only allow edits when the button is clicked, but, clicking on the listbox has no effect

TIA
Detrie
BrianS
Perhaps a better way would be to set the Locked or Enabled properties of the individual controls instead of the AllowEdits property of the entire form.
detrie
Hi Brian,
thanks for the reply.
So if I Lock indvidual contols all except the ListBox, then the Command button will "unlock" the controls... right?
Detrie
detrie
I came up with a solution...

I set the form to property to Allow Edits "No"
On the ListBox on MouseDown event Me.AllowEdits=True
On the ListBox on MouseUp event Me.AllowEdits=False

Works like a charm!

Thanks for your input
Detrie
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.