I have a mulitselect list box from which the selections are stored in a table. I have been thinking about the following.
I collect the results of the selections in an array. As an array does not have a data type which can be stored in a table I have two possible solutions.
1.I can store each element into a seperate field e.g.
2.I can store the array as a text field using the following
For form opperations either method works fine and I know that only 5 values can be stored in the array.
My question is am I making a rod for my own back here? In reports I can seperate each value by using the experession
one: splitintostrings([teststorearray],0)
to relate to the function
This would be a nested query and seems to work fine. I can use this query later on to provide text versions of these codes. I am in the early stages of this and I wonder if anyone has an idea of any problems I might run into if the data in the db becomes larger?
any thoughts welcome
redapples
Want the best answers? See FAQ181-2886
I collect the results of the selections in an array. As an array does not have a data type which can be stored in a table I have two possible solutions.
1.I can store each element into a seperate field e.g.
Code:
With rs
!xtratext1 = xtratextselect(0)
!xtratext2 = xtratextselect(1)
!xtratext3 = xtratextselect(2)
!xtratext4 = xtratextselect(3)
!xtratext5 = xtratextselect(4)
.Update
.Requery
.Close
End With
2.I can store the array as a text field using the following
Code:
strchosen = Join(StoreInTblArray, ",")
rs!teststorearray = strchosen
rs.Update
rs.Requery
rs.Close
My question is am I making a rod for my own back here? In reports I can seperate each value by using the experession
one: splitintostrings([teststorearray],0)
to relate to the function
Code:
Function splitintostrings(strString, iwhich As Integer) As Integer
strString = Split(strString, ",")
If UBound(strString) >= iwhich Then
splitintostrings = strString(iwhich)
Else
splitintostrings = 0
End If
End Function
any thoughts welcome
redapples
Want the best answers? See FAQ181-2886