Using record selector on a form to select multiple records

A fellow Access MVP asked if there was a way of using the record selector to select multiple records and perform an action on them.  Tom Wickerath, also a fellow Access MVP, responded with How to enumerate selected form records in Access 2003 and in Access 2002.   I'd never seen the forms SelTop or SelHeight properties before so was quite intrigued.   So I had to find a form in the Granite Fleet Manager where I could implement this functionality.   

BulkMoverMove

The code was fairly simple to implement.  This gives us some more UI options which allow us to make Access continuous forms operate a bit like Excel worksheets in some simple respects.

Should the user be intrigued by the bulk move button and they didn't select any records they will get the following message.

BulkMoverMoveMessage

 

Other UI Enhancements

Now this form allows the user to return the equipment to the main shop so I designed the UI with two radio buttons labeled Move and Return.  You will note the new location field is disabled and some command button captions were changed.

BulkMoverReturn

It's possible for equipment to be issued to multiple temporary locations inadvertently. I created an additional All or Multiple Locations set of radio buttons along with the red diamond symbol.   This allows the users to very quickly locate all such anomalous data and correct it immediately.  

BulkMoverMultipleLocations

The red diamond is the letter u in the WingDings font.  I chose the diamond as it has the most "colour" of any WingDings font entries and is a neutral symbol.

Now I'm not very happy with how the All and Multiple Locations set of radio buttons takes up so much room vertically.  And it doesn't fit in well with the rest of the UI on that form or with other forms.   But that was the best I could think of at the time.

Published Sun, Feb 22 2009 23:32 by Tony
Filed under: , ,

Comments

# re: Using record selector on a form to select multiple records

I don't enable command buttons until the form is in a state that they command button should be usable. Based on this principle, the BULK MOVE command button should not be enabled until there are multiple records selected.

Now, how do you test for that?

I'd guess it's going to have to go into the OnCurrent event (I'm assuming your form is a continuos form with a header, rather than a main form with a subform -- if it's the latter, you'd have to use the subform's OnCurrent).

I suspect the code would be kind of fussy. But I think you should be popping up messages that say "Naughty, naughty! You shouldn't have done that!", or something to that effect (which is how I read your MsgBox text).

Don't let them click on something that they can't yet use!

--

David W. Fenton

http://dfenton.com/DFA/

Monday, February 23, 2009 9:14 PM by David W. Fenton

# re: Using record selector on a form to select multiple records

David, if a form is getting rather ugly then yes I'll turn off command buttons until they can be used.   But I don't tend to do that a lot.

But I'm not motivated enough to figure this one out right now.

So I suggest that you write the code and either create a page on it or email me the code and explanation and I'll create a guest blog entry for you.

How's that for passing the buck?

Tuesday, February 24, 2009 8:23 PM by Tony

Leave a Comment

(required) 
(required) 
(optional)
(required)