Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How Do I Multi Select?

Status
Not open for further replies.

Shake412

Programmer
Apr 17, 2002
55
GB
I'm using a continuous form with the Record Selectors active. How do I refer to records which are selected when selecting a range of records?

If I want to return data from one record, I just refer to the value of that control. Is there a way to loop through some collection of all the records selected (like with tables when deleting a range of records)

Thx
 
I have done something similar: An mp3 "playlist" editor. Unfortunately I don't have the db anymore - was too lazy to keep it updated... ;-)
Just set your form display to endless,
add a checkbox (also as a field to your table).
Then loop through your recordset. This will allow you to address all selected records...

Does that help?
Cheers and a Happy New Year!
MakeItSo

Andreas Galambos
EDP / Technical Support Specialist
(andreas.galambos@bowneglobal.de)
HP:
 
Thanks for the tip

I have used check boxes, but, as far as I know I can't select a range, i.e. Select 2 points while holding down shift to select each row in between. Do you know anyway that this is possible.

I am also trying to write an mp3 editor, but to bulk change names, etc.

 
Hi Shake.
In that case: Couldn't you just use a multi-select Listbox?

You can then refer to
faq701-1927 and/or
faq701-4432

to set up your SQL-statements for the desired operation(s)
[flowerface]

Andreas Galambos
EDP / Technical Support Specialist
(andreas.galambos@bowneglobal.de)
HP:
 
That would work. Just that there's not a much fexability on a list box.

Thanks again.
 
Yeah, right....

how about a small textbox where you enter a mathcing criterion:
"Select all matching:" and you enter e.g. "ACDC"
Then you loop through your fields with
Code:
If not IsNull(Me!CritField) and Me!CritField<>&quot;&quot; Then
sSQL=&quot;Update [your tabl] Set [Chosen]=-1 WHERE [title] LIKE *&quot; & Me!CritField & &quot;*&quot;
DoCmd.SetWarnings False
DoCmd.RunSQL sSQL
DoCmd.SetWarnings True

Would that be an option?
 
Cool. Thanks. I'll give that a go.

cheers once again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top