Selecting multiple rows in a continuous form?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to be able to have my users select multiple rows and then act on
all of them. I note that you can select multiple rows by selecting on the
Record Selectors, but I can't figure out how to read them. SelTop returns the
first selected row, but SelHeight always returns zero.

Any ideas?

Maury
 
Maury Markowitz said:
I would like to be able to have my users select multiple rows and
then act on all of them. I note that you can select multiple rows by
selecting on the Record Selectors, but I can't figure out how to read
them. SelTop returns the first selected row, but SelHeight always
returns zero.

Any ideas?

I couldn't locate the test form where I played around with this, but as
I recall, the trouble is that when you go to click a button somewhere
else -- in the form header or footer section, or on the main form if
you're selecting on a subform -- the selection is lost. If you are
selecting records on a continuous subform, you can get the correct
SelHeight property in the Exit event of the subform control itself, and
save it in a module-level variable for use by code on the main form. If
you are using a simple continuous form, you should probably capture the
SelTop and SelHeight properties in the form's Click event, and save them
to module-level variables.
 
.. If you can use a listbox in place of the continues form, then it is no
problem. If you look at the following screen shots, my users find it VERY
hard to tell when I used a continues form, or a listbox:
http://www.members.shaw.ca/AlbertKallal/Articles/Grid.htm

however, if you do in fact need a continues form. Then a possible solution
is to simply add a check box column. If the database is to be multi-user,
then that table of records checked could be placed in the front end (just
use a join to bring in both tables to the one form).

Another solution is to use a un-bound check box. I have a working example
that does just here:

http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html
(grab the multi-select example).
 
When I grow up, I want to create projects as good as you... =) Some very
nice stuff.

Sharkbyte
 
Dirk Goldgar said:
save it in a module-level variable for use by code on the main form. If
you are using a simple continuous form, you should probably capture the
SelTop and SelHeight properties in the form's Click event, and save them
to module-level variables.

I _finally_ got a chance to try this -- I've been busy writing an entire
accounting UI (don't ever do this) -- and it works like a champ. It makes the
display a little blinky, but that's a very small price to pay.

Thanks again!

Maury
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top