473,503 Members | 1,797 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Finding data in a memo field

I have a linked table (Access 2003) to an Outlook inbox. The body of
the e-mail messages are in a memo field. My problem is that I need to
"read" the memo and find data on certain lines.

The memo will look something like this:

Order: J123451
Placed By: Joe.systems,daily

Order: J123452
Placed By: John.systems,daily

Order: J123453
Placed By: Tom.engineering,daily

Order: J123454
Placed By: Joe.systems,weekly

I need to find each order number and create a Orders record (J12345)
in the
Orders table and write the detail to a OrdersDetail table that has a
"lookup
field" to the Orders Table.

How do I go about reading through the memo and finding/using the data
that I want?
Nov 13 '05 #1
3 5203
Helgardh wrote:
I have a linked table (Access 2003) to an Outlook inbox. The body of
the e-mail messages are in a memo field. My problem is that I need to
"read" the memo and find data on certain lines.

The memo will look something like this:

Order: J123451
Placed By: Joe.systems,daily

Order: J123452
Placed By: John.systems,daily

Order: J123453
Placed By: Tom.engineering,daily

Order: J123454
Placed By: Joe.systems,weekly

I need to find each order number and create a Orders record (J12345)
in the
Orders table and write the detail to a OrdersDetail table that has a
"lookup
field" to the Orders Table.

How do I go about reading through the memo and finding/using the data
that I want?


I'd store the memo to a variable. Then I'd search for "Order:" Then
I'd Mid() it. Then I'd search for chr(10) + chr(13). Then I'd search
for the next "Order:". Anything between the two is specific to an
order. THen I'd move to the next group. If the second search returns a
0, then you are at the end of the list.

Ex:
S = Memo
Do while True
Start = Instr(s,"Order:")
If start > 0 then
'remove everthing up to and including "Order: "
s = Mid(s,Start + 6)

'find where the next "Order: " exists
End = Instr(s,"Order:")

'this is the string from the order# to next order#
'IOW, getting all data between "Order#" and "Order#"
If End > 0 then
ProcessOrder = Left(s,End-1)
Else
'at the end of the list
ProcessOrder = s
ENdif

...process order by parsing out the order info. Ex:
'Order: J123451
'Placed By: Joe.systems,daily

'now move to the next "Order: "
If End > 0 then
s = Mid(s,End)
Endif
Else
Exit DO
Endif
Loop

Nov 13 '05 #2
he******@nha.co.za (Helgardh) wrote in message news:<a3**************************@posting.google. com>...
I have a linked table (Access 2003) to an Outlook inbox. The body of
the e-mail messages are in a memo field. My problem is that I need to
"read" the memo and find data on certain lines.

The memo will look something like this:

Order: J123451
Placed By: Joe.systems,daily

Order: J123452
Placed By: John.systems,daily

Order: J123453
Placed By: Tom.engineering,daily

Order: J123454
Placed By: Joe.systems,weekly

I need to find each order number and create a Orders record (J12345)
in the
Orders table and write the detail to a OrdersDetail table that has a
"lookup
field" to the Orders Table.

How do I go about reading through the memo and finding/using the data
that I want?

My guess is you could read the content of the message into a string
variable and then parse it out, then write that data to your table.
Don't think it's going to be that easy.
Nov 13 '05 #3
Thank you Salad!
Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2419
by: ivan | last post by:
Access 97 I have a memo field in a footer on a subform. When I print the form, all data is printed except the data that was entered into the memo field. The memo field itself is printed (the...
1
1613
by: Rose | last post by:
I have an ACCESS 2000 database and I have a table with a field setup as a MEMO. I am trying to run a query and append the MEMO field to another table - everytime I run the query - it drops data -...
13
2485
by: MLH | last post by:
I have a form with two controls: !! - combo box !! - text box A button on the form tries to run this SQL when clicked... INSERT INTO BodyMsgsSent (ToWhom, BodyText) SELECT DISTINCTROW !! AS...
5
8608
by: kotowskil | last post by:
A report has a subform. The subform is set to datasheet view and its RecordSource is a select query that includes a memo field from the source table. The memo field's Can Grow property is Yes,...
3
1982
by: MLH | last post by:
Precise determinations are not the objective. I would lke a single button click approach to creating a report/table/dynaset - whatever - to display each table name and an approx- imation of the...
9
5718
by: RMC | last post by:
Hello, I'm looking for a way to parse/format a memo field within a report. The Access 2000 database (application) has an equipment table that holds a memo field. Within the report, the memo...
0
14386
by: Grip | last post by:
Hi, I have gone throught the group and Microsoft's online help and have seen many suggestions but I am still seeking clarity: 1. I have an excel spreadsheet. Column A contains text that may...
15
7320
by: sara | last post by:
I have a Memo field in a table to hold notes from a conversation a social worker has had with a client (this is for a non-profit). If the user needs to update the memo field, I need to find the...
3
9371
by: Kunal Desale | last post by:
Hi, How to insert/update data in foxpro table field having datatype MEMO using Linked Server? I have written sql insert queries in which i have used linked server to insert data into foxpro...
0
7199
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7076
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...
0
7274
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,...
0
7323
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...
0
5576
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5005
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...
0
3151
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1507
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
732
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.