[AccessD] text to Chr()

Stuart McLachlan stuart at lexacorp.com.pg
Fri Oct 13 18:05:29 CDT 2006


On 13 Oct 2006 at 20:43, Mark A Matte wrote:

> Hello All,
> 
> Hope everyone will have a nice weekend.
> 
> I need to take a very long string of characters (there in a memo 
> field)...and break them into individual Chr() codes.  For each character I
> need to create a row in a different table indicating what Chr() was used. 
> Any ideas/suggestions to the best approach?

I'd probably go with something along the lines of (aircode!):

Function BuildData(InputString as String) 
Dim rs as DAO.Recordset
DIm lngLoop as Long
Set rs = CurrentDB.OpenRecordset("tblCharValues")
With rs
For lngLoop  = 1 to Len(InputString)
  .Addnew
  !CharValue = Asc(Mid$(InputString,lngLoop,1))
  .Update
Next
.Close
End With
Set rs = Nothing
End Function-- 
Stuart





More information about the AccessD mailing list