Link to home
Create AccountLog in
Avatar of GPSAddict
GPSAddict

asked on

Access: Disable Highlight/Multiselect in a datasheet subform

How can I do this by code ? The reason is that I don't want the user to delete multiple records at once...only one at a time. Thanks
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

How did you build the datasheet subform? Is this an actual form, with a Recordsource and such, or is this a subform object where you're using a Query?

I ask because working with these two types are entirely different ..
I don't think you can disable this.

You could set AllowDeletes to No, then  via a Delete button, turn that on, delete one record, then turn it back off. Also, ask the use to click into the row of the record to be deleted.

mx
Avatar of GPSAddict
GPSAddict

ASKER

DatabaseMX: That still gives them the possibility to select multi rows.
LSMConsulting: It is a standard form, with a table as recordsource that has been set to show as a datasheet.

Thanks
Have you tried this as a Continuous Form? IIRC, you cannot multiselect in a Continuous form. You can also build your continuous form to look almost exactly like a Datasheet, but you get a bit more Events to work with (which is a good thing in general).
So there's no easy way around this huh ? I mean keeping it as a datasheet.
I like DatabaseMX solution however but I still need to disable the multi-selection.
ASKER CERTIFIED SOLUTION
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer