cheuschober
Muse of Fire
- Local time
- Today, 01:20
- Joined
- Oct 25, 2004
- Messages
- 168
Hey there folks. Run into a pickle that I just can't seem to find documented in what I have available to me (which is mostly O'Reilly or MsVBA Help).
Does anyone know the proper syntax for getting a comma-delimited text field (pulled via recordset) into a dynamic variant array using split()? I've tried quite a few combos to create it but no luck thus far (continue receiving a 'type mismatch' error).
Code is as follows (lets assume I know how to open a recordset and use it properly -- recordset does retrieve the value of the requested text field with no hangups):
Could it be that I'm missing some reference ? I've tried various combinations of varSendTo and varSendTo(), strSendTo and rs!SendTo among others with little luck in dealing with this mismatch.
Any thoughts? Access 2k here with Jet 8 and the most recent SP so I'm reasonably sure split should be supported.
Many thanks,
~Chad
Does anyone know the proper syntax for getting a comma-delimited text field (pulled via recordset) into a dynamic variant array using split()? I've tried quite a few combos to create it but no luck thus far (continue receiving a 'type mismatch' error).
Code is as follows (lets assume I know how to open a recordset and use it properly -- recordset does retrieve the value of the requested text field with no hangups):
Code:
Dim varSendTo() as Variant
Dim strSendTo as String
'Creates a string SendTo just to be redundant (shouldn't need this)
strSendTo = rs!SendTo
'Splits "To" Array
varSendTo = Split(strSendTo, ",", -1)
Could it be that I'm missing some reference ? I've tried various combinations of varSendTo and varSendTo(), strSendTo and rs!SendTo among others with little luck in dealing with this mismatch.
Any thoughts? Access 2k here with Jet 8 and the most recent SP so I'm reasonably sure split should be supported.
Many thanks,
~Chad