Single row select

  • Thread starter Thread starter BadStorm
  • Start date Start date
B

BadStorm

Hi,
i have a personal form that show multiple lines. It is possilble permitt to
select only one row at time?
Thanks
 
Can you please remove my email address from your news group server.


I SEE Holistic Business Management "Safety+Efficiency=Excellence"
 
BadStorm said:
Hi,
i have a personal form that show multiple lines. It is possilble permitt
to select only one row at time?

You should be able to do that by clicking on a single record selector to the
left of the row.
 
thanks for your reply,
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.
thnaks
 
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
 
Thanks a lor for your reply,
i'm using a continuous form. Tha problem is that whene a user delete more
lines, with the before update i know all the rows that the user selected.
But with the After update event i can know only the last row deleted. There
is a method to manage row for row or know all the rows deleted with the
After Update Event?
Thanks
 
Forms(SomeFormName).SelHeight
returns the number of rows selected

Forms(0).SelHeight = 1
sets the number of rows selected to 1

Where you use that information and how you use it will depend on what you want
to do. If you want to stop them from ever selecting more than one row at a
time, then you will need to use some form event to reset the selection. If
you want to stop the delete, but allow the selection then you will need to use
the before update event to stop the delete from occuring.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
Back
Top