overdraft015
Programmer
i need to be able to generate a list of all the possible combinations using the following:
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
The lengh must be 4 long and can be made using any combination of the above
e.g. 0000, 0001, 000A, A03J, AAAA, AAA2, ABCD, 1ABC, A1BC, AB1C, ABC1 etc...
i was starting something using loops and looking up a table with the above and doing an rs.next for the next value but then i ran into a problem when trying to alter the 2nd char.
this is what i was playing with but im sure i could be over complicating things maybe. (also the table1 was just a list of the values i mentioned and a sorting order). feel free to ignore what i did as this could be the totally wrong way of starting. thanks
Private Sub calculate()
Dim myDb As Database
Dim myRs1 As Recordset
Dim StrQueryname1 As String
Dim i As Integer
dim b as
Set myDb = CurrentDb
StrQueryname1 = "SELECT Sort, Value FROM Table1 ORDER BY Sort"
c1 = 0
c2 = 0
c3 = 0
c4 = 0
Next
End
Do While c1 & c2 & c3 & c4 <> "ZZZZ"
Debug.Print "F" & c1 & c2 & c3 & c4
Do While c4 <> "Z"
c4 = myRs1!Value
Debug.Print "F" & c1 & c2 & c3 & c4
myRs1.MoveNext
Loop
Loop
End Sub
It's not what you know. It's who's on Tek-Tip's
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
The lengh must be 4 long and can be made using any combination of the above
e.g. 0000, 0001, 000A, A03J, AAAA, AAA2, ABCD, 1ABC, A1BC, AB1C, ABC1 etc...
i was starting something using loops and looking up a table with the above and doing an rs.next for the next value but then i ran into a problem when trying to alter the 2nd char.
this is what i was playing with but im sure i could be over complicating things maybe. (also the table1 was just a list of the values i mentioned and a sorting order). feel free to ignore what i did as this could be the totally wrong way of starting. thanks
Private Sub calculate()
Dim myDb As Database
Dim myRs1 As Recordset
Dim StrQueryname1 As String
Dim i As Integer
dim b as
Set myDb = CurrentDb
StrQueryname1 = "SELECT Sort, Value FROM Table1 ORDER BY Sort"
c1 = 0
c2 = 0
c3 = 0
c4 = 0
Next
End
Do While c1 & c2 & c3 & c4 <> "ZZZZ"
Debug.Print "F" & c1 & c2 & c3 & c4
Do While c4 <> "Z"
c4 = myRs1!Value
Debug.Print "F" & c1 & c2 & c3 & c4
myRs1.MoveNext
Loop
Loop
End Sub
It's not what you know. It's who's on Tek-Tip's