Tecnologia, programação e muito Visual FoxPro.

sexta-feira, 15 de outubro de 2010

[Access VBA Central] Concatenate multiply records and have a memo field with text

 

SUBJECT: Looking for Access VBA modual programing.

I have a warranty claims database for WorkOrders to repair airplanes when
they come into for maintenance. Whenever warranty is filed a Claim is
submitted so that the shop can be reimbursed for parts and work performed
from the manufacture. In a claim there can be multiple line items that
were fixed. However the data is recorded record-by- record for each item
that was fixed. In one field is a notes text field that is filled out by
the mechanic describing what the defect was. (Field Name: Squawk) and
another text field that explains how the defect was repaired by the
mechanic (Field: Action). Here is a list of fields:

Field 1.) CLAIMNO; Field 2.) SQUAWKNO; Field 3.) SEQNUMBER; Field 4.)
CODETYPE ; Field 5.) NOTETEXTS

The 'CODETYPE' field is coded with the letter "F" for "Failure" to
describe the wording in the "NOTETEXT" field. A letter "A" in the
'CODETYPE' field describe what "Action" that was taken to repair or
correct the failure in the "NOTETEXTS" field.

In some NOTETEXTS field there may be empty lines so there needs to be
some programming to ignore empty text lines.

Here is how the data is recorded now in a database:

CLAIMNO SQUAWKNO SEQNUMBER CODETYPE NOTETEXTS
234568 1 1 F Per Sam Rogers at Williams International, comply
234568 1 2 F with FADEC downloads. Contact for assistance with
234568 1 3 F Tech Rep George Smith.
234568 1 4 F Williams International ref number is 23456ADS
234568 1 5 F
234568 1 6 F Download cable found to be defective.

234568 1 1 A Hooked up laptop for download. Attempted to
234568 1 2 A download bat software for -7 engine. Software was not
234568 1 3 A in laptop. Contacted Williams! He sent -4 config. files
234568 1 4 A for laptop. Loaded files and download EMT files
234568 1 5 A Everything is working fine now. Changed cable.

I want to concatenate the (Failure, NOTETEXTS) field into a memo field
and concatenate the (Action, NOTETEXTS) into a memo field then pull
"Failure" and "Action" memo field together to form only one record like
the example below.

This is how I like the data to look afterwards:

CLAIMNO SQUAWKNO NOTETEXTS
234568 1 Squawk: Per Sam Rogers at Williams International, comply with
FADEC downloads. Contact for assistance with Tech Rep George Smith.
Williams International Ref number is 23456ADS. Action: Hooked up laptop
for download. Attempted to download Bat software for -7 engine. Software
was not in laptop. Contacted Williams! He sent -4 configuration files for
laptop. Loaded files and download EMT files. Everything is working fine
now. Changed cable. EOF

I have tried to find a Access example on the web but cannot find one that
works with this many fields. I hope I have explain my problem very well.
If please send me additional questions.

Thanks

Eric

Eric Patterson

__._,_.___
Recent Activity:
.

__,_._,___

Nenhum comentário:

Arquivo do blog