but my real problem is how to NO permitt to select multipleline from code,
so if other people use my form, they cannot select multiplelines.
I'm not sure why it's a problem to allow the user to select multiple
lines. Is it because they're deleting them? Or some other action?
More information would help.
If you are using a continuous form, Access allows selection of
multiple records, and I don't think you can turn that off. However,
you can remove the record selectors (in the form's properties) so that
the user can't highlight multiple records. But then you don't see the
record selector arrow either.
If the problem is that the user is deleting them, you can use the
Before Delete Confirm event to ask them if they are sure for each
record separately.
If your question is about a listbox, then set its Multi Select
property to None.
Armen Stein
Microsoft Access MVP
www.JStreetTech.com