473,811 Members | 2,665 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Parsing Field into multiple records by Carriage Return

2 New Member
I'm using Access 2003 SP3. I know very little about VB code, but inherited a database with some code and modules already running. I have a new table with a material number and date as the primary key and then it contains a Memo field called instruction. This field (Instruction) contains multple instructions for each material with a carriage return separating each one. I need to create a new table with material, Date and then Seq# (new Field) followed by a text field with the single instruction. I need code that loops thru the instruction field from one carriage return to the next and writes out the Material, Date and then Seq#, 0001, 0002, etc. Thanks in advance for help.
Oct 13 '08 #1
3 3249
NeoPa
32,579 Recognized Expert Moderator MVP
Would the Split() function suit your needs?

It returns an array of items split by the character (or characters) you specify as a separator.
Oct 13 '08 #2
Skeeter66
2 New Member
It might. Since I'm not an expert with VB, I'm not sure how the Split() function works. Will it allow me to read records from one table and write the results into another table keeping the same Key and adding a sequence number. Originating table has following: Material, Date, Instruction. Destination table has: Material, Date, Sequence, Instruction. One record in Source table can be 10 + records into destination table. Will Split() allow this ?
Oct 14 '08 #3
NeoPa
32,579 Recognized Expert Moderator MVP
It won't do it for you, but it will separate out the various lines into an array (as per your question). From there you can do with them whatever you need.
Oct 14 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
4602
by: chrissmith_76_Fed_Up_With_Spam | last post by:
Hello all, I am using Access 2002, with file format of Access 2000, and am experiencing a problem. I have a subform that is shown in datasheet view for users to edit data direct to a table. When a user presses the Enter (or Return) key a carriage return is made in the cell, rather than the cursor moving to the next field, which is
2
38768
by: John Dalberg | last post by:
Hi What's the regex to remove the carriage return/line field from a string? These can occur multiple times in the string as in xxx\r\n\r\n. -- John Dalberg
1
2396
by: DigitalPrankster | last post by:
I have a form that I am using to generate an email with several user selected fields being part of it. As part of this form, I have a select box which allows the user to select which email addresses it should be sent to. The box works great except that the CGI script I'm sending the values to can only parse a single line for each field in the form. The issue comes into play when someone selects more than one value in the select box, the...
4
27833
by: whitej77777 | last post by:
I am trying to write a user defined function that will allow me to strip off the last carriage return and line feed from a text field. We have address fields stored in a text field for our ERP system and some of them have an extra carriage return and line feed at the end of them. This causes havoc when we sync between our ERP system and CRM system. If anyone knows a way to solve this problem the help would be appreciated. Examples:...
0
4457
chumlyumly
by: chumlyumly | last post by:
Hello scripters - OS: Mac OSX Language: PHP w/ MySQL database I've created an insert page where a user inputs his info, which then goes to four different tables in a MySQL database. The tables are all linked with the field 'member_id', which is an auto-increment field in the parent table ('members'). I've been able to input multiple records into the other three tables 'specialty_groups', 'committee_interest' and 'committee_member'...
10
10618
by: H | last post by:
Hi, I have the following address fields in a table: flat_number house_name_or_number street village postal_town county postcode
9
1770
by: Jasper | last post by:
Hi, I have multiple data files which need parsing in realtime so high performance is *crucial*. I dont have a format definition, but from what I can see there is a hierarchy of data. Each data field is named thus <"name":(the <are mine). The data can be quoted text or unquoted text or a composite hierarcy field. Each name/data pair is terminated by a comma unless it is the last in the
2
5540
by: AdrianJ1980 | last post by:
Hi, I apologise for not providing a code basis for my question, but i really am stuck. Does anyone know how i can split a memo field, such as below, into separate records. (The data comes from the body of daily system generated emails that the database is linked to) Single Field: AUS 123 $450 $396 -4 N AUS 456 $2560 $2860 300 N AUS 789 $987 $2 -985 P
3
4833
by: bstjean | last post by:
Hi everyone, I am trying to find an efficient way to perform a special query. Let me explain what I want. Let's say we are looking for all description that match "this is the target". In fact, I want to find records that match those 4 words in this sequence disregarding the number of spaces (I mean spaces, tabs, Cr, Lf, etc) between them.
0
9607
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10652
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10395
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10137
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7673
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6895
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5561
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5700
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3874
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.