[AccessD] A2003:Reading text box Line by Line and insertingeachline into a dB field

Darren DICK darrend at nimble.com.au
Wed May 10 09:24:34 CDT 2006


Brilliant A.D - Ill give it a whirl
Many thanks

 


Darren
------------------------------
 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D.TEJPAL
Sent: Wednesday, 10 May 2006 10:01 PM
To: Access Developers discussion and problem solving
Cc: ADT
Subject: Re: [AccessD] A2003:Reading text box Line by Line and insertingeachline
into a dB field

Darren,

    Each individual line in a multi-line text box in Access can be grabbed via
Split() function. For example, if Rtv is a variant type variable, the statement
Rtv = Split(MyTextbox, vbCrLf)  will generate an array holding the values of
individual lines.

    Rtv(0) represents the first line, while Rtv(UBound(Rtv)) represents the last
line.

Best wishes,
A.D.Tejpal
---------------

  ----- Original Message ----- 
  From: Darren DICK 
  To: 'Access Developers discussion and problem solving' 
  Sent: Sunday, May 07, 2006 18:33
  Subject: [AccessD] A2003:Reading text box Line by Line and inserting eachline
into a dB field


  Hi all
  I am doing some pro-bono work for some General orphanages and AIDS orphanages
in Thailand (Feel free to email me off list for any info - Shameless plug - Yes
we are always looking for sponsors - another shameless plug)
   
  I have just been handed a CD of Publisher files with photos and a small
'blurb' about each child
  There are about 600 on this CD alone
  Each MS Publisher 'record' contains the photo and a short 'blurb' that looks
like this
   
  DUANPEN OONBOON <-- Childs Full Name

  Gender:   Male

  Born:   23rd June 1995

  Grade:  2005-2006- Primary 4

  Favourite Subject:   English

  Favourite Sport: Volley Ball

  Favourite Food: Fried Rice

  Favourite Colour: Red

  Child  Ref. # MCS-072  

  You can see there is 9 or so lines of text for each record.

  And it's all in one text field - an MS Publisher text box

  And I have to get each line out of that one field and send the first line to
the
  FullName field of the dB
  the second line to the Gender field of the dB. The third line to the DoB field
  of the dB etc etc
  Essentially read that text box line by line and have the contents of each line
  'mapped' to a field in a table
   
  Any suggestions?
   
  I'm also open to suggestions of getting the images out of publisher and onto
the
  HardDrive in some meaningful name format
   
  If you need a copy of the Publisher file - I am more than willing to share a
  snip off line
   
  Many many thanks in advance
   
  Darren
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list