Originally posted by: burken
The right term for this is permutations, or am I wrong?
Originally posted by: MePenguin
A bit late here, but how would you modify this to make sure no combinations, independant of order, were repeated if you picked out a subset of the elements?
e.g.
String="mp3 rock hard prog"
Need all combinations of 3 words without repeating:
mp3 rock hard
mp3 rock prog
mp3 hard prog
rock hard prog
All other combinations would be reordered repeats of these 4...
I need this for somethign completely different, but the logic is the same - help please!
hi can any one explian how to do combination in access form of 4 textbox values and diplay list of combination in onther textbox
ReplyPinky98s example works great for only 4 words in the strTotalString. But I need something for a string with like 178 words and need all combination with 3 words. Anyone knows what I have to change in the code to achieve this?
ReplyThe logic to do some thing like this would be completely different.
All you do it loop through the string masking each alternate sub string.
e.g.
strTotalString = "mp3 rock hard prog"
SubStrings = Split(strTotalString, " ")
ReDim Combinations(UBound(SubStrings))
For i = LBound(SubStrings) To UBound(SubStrings)
Combinations(i) = ""
For j = LBound(SubStrings) To UBound(SubStrings)
If (j <> i) Then Combinations(i) = Combinations(i) & " " & SubStrings(j)
Next j
Next i
Reply
Originally posted by: pranveer
hello sir,
what i see in it that no one can understand what u r codeing here.Here some simplicity is required.
Just like that how to implement this code give some simple examples that will execute diretly without increment in this file.Like to add some textbox button names,labels name . How we can know these all.
Originally posted by: Vitaly
It would be best done using an enumeration function.
Regards,
Vitaly
P.S. Looking for the best tooltips support? - Try http://www.tootips.net
Reply
Originally posted by: Scott
I think you mean a "recursive" function :-)
Reply