>I have a text file that I need to import into my Access Database. The problem
>is, this is the first report I have come across that has data for one patient
[quoted text clipped - 20 lines]
>I really appreciate any help.
>Good night and thank you.
John. Thank you so much for your response. You are correct, I mis counted.
Below is a better example of what I have on my hands. First Row Patient, 2nd,
3rd, 4th row the remaining info. Your first option mentioned using a word
processor, will microsoft word work? I attempted to use its Find and Replace
option but I did not know how to represent [space+linebreak] in the find
field.
I have had no experience with Perl and little with VBA. Do you have any
examples of VBA code that "write VBA code to read the text file line by line,
assemble records
> and append them directly to your table."? Or is that something normally covered in a three week course at New Horizons? :)
Thanks again for your help.
ID Name VisitDate VisitTime Location
M000443990 MORA,EDUARDO N M/30
07/05/05
1440
CARDIOLOGY LOCUM MD
> Hi Antonio,
>
[quoted text clipped - 78 lines]
>
> Please respond in the newgroup and not by email.
Antonio - 03 Jul 2005 09:34 GMT
I posted a question regarding the VBA code example John was talking about in
this question on the Access Programming VBA group on 7/3/05.
> John. Thank you so much for your response. You are correct, I mis counted.
> Below is a better example of what I have on my hands. First Row Patient, 2nd,
[quoted text clipped - 97 lines]
> >
> > Please respond in the newgroup and not by email.
John Nurick - 03 Jul 2005 19:05 GMT
Hi Antonio,
Your new example raises new questions. Does
MORA,EDUARDO N M/30
need to go into one field
PatientName: MORA,EDUARDO N M/30
or several, e.g.
FamilyName: MORA
FirstName: EDUARDO
MiddleName: N
Sex: M
Age: 30
Similarly, does the last row parse as
Location: CARDIOLOGY LOCUM MD
or something like
Location: CARDIOLOGY
Status: LOCUM MD
?
The searching and replacing can be done with Microsoft Word's wildcard
search feature. It's weak and buggy compared with standard pattern
matching engines (such as the ones in Perl, Python, VBScript, etc.),
but the following should help you get started. Study the help file
carefully to understand them:
Delete trailing spaces: replace
> {1,}^013
with
^p
Change [linebreak + spaces] to [tab]: replace
^013 *<
with
^t
Change [more than one space between words] to [tab]: replace
> {2,}<
with
^t
>John. Thank you so much for your response. You are correct, I mis counted.
>Below is a better example of what I have on my hands. First Row Patient, 2nd,
[quoted text clipped - 97 lines]
>>
>> Please respond in the newgroup and not by email.
--
John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.
Antonio - 05 Jul 2005 12:15 GMT
Thank you very much John. The word processor hints AND the VBA code have
helped tremendously.
Antonio.
> Hi Antonio,
>
[quoted text clipped - 143 lines]
>
> Please respond in the newgroup and not by email.