473,395 Members | 1,583 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Cutting data from a field

JA
Hi,

I have an expression (2 actually) to move some text from one field to
another. It moves the part after the ":" (colon).

Left([ProductName], InStr([ProductName], ":") - 1)

Mid([ProductName], InStr([ProductName], ":") + 1)

I have to move some other text from one field to another. The text always
starts with "product description", and goes to the end of the field, but it
can be really, really long! And it is from one memo field to another, rather
than text fields. Can I just adapt the above expressions like this:?
Left([ProductDetail], InStr([ProductName], "Product Description") - 1)

Mid([ProductDetail], InStr([ProductName], "Product Description") + 1)
Thanks, J~
Oct 1 '06 #1
4 1189
JA wrote:
Hi,

I have an expression (2 actually) to move some text from one field to
another. It moves the part after the ":" (colon).

Left([ProductName], InStr([ProductName], ":") - 1)

Mid([ProductName], InStr([ProductName], ":") + 1)

I have to move some other text from one field to another. The text
always starts with "product description", and goes to the end of the
field, but it can be really, really long! And it is from one memo
field to another, rather than text fields. Can I just adapt the above
expressions like this:?

Left([ProductDetail], InStr([ProductName], "Product Description")
- 1)
Mid([ProductDetail], InStr([ProductName], "Product Description")
+ 1)

Thanks, J~
You only need one expression. Since "Product Description" is always 19
characters long all you need is...

Mid([ProductDetail], 20)

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Oct 1 '06 #2
JA
It isn't just the words "product description" that I need to move. The text
just always start out with that. I need to move everything from "product
description" on till the end of the record. And it isn't ever a set amount
of characters. So would that still work?

"Rick Brandt" <ri*********@hotmail.comwrote in message
news:27******************@newssvr25.news.prodigy.n et...
JA wrote:
>Hi,

I have an expression (2 actually) to move some text from one field to
another. It moves the part after the ":" (colon).

Left([ProductName], InStr([ProductName], ":") - 1)

Mid([ProductName], InStr([ProductName], ":") + 1)

I have to move some other text from one field to another. The text
always starts with "product description", and goes to the end of the
field, but it can be really, really long! And it is from one memo
field to another, rather than text fields. Can I just adapt the above
expressions like this:?

Left([ProductDetail], InStr([ProductName], "Product Description")
- 1)
Mid([ProductDetail], InStr([ProductName], "Product Description")
+ 1)

Thanks, J~

You only need one expression. Since "Product Description" is always 19
characters long all you need is...

Mid([ProductDetail], 20)

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com

Oct 1 '06 #3
JA wrote:
It isn't just the words "product description" that I need to move.
The text just always start out with that. I need to move everything
from "product description" on till the end of the record. And it
isn't ever a set amount of characters. So would that still work?
Mid([ProductDetail], 20)

....returns all characters from the 20th one on until the end of supplied string.

(so yes)

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Oct 1 '06 #4
"JA" <ja*****@kc.rr.comwrote
It isn't just the words "product description"
that I need to move. The text just always start
out with that. I need to move everything from
"product description" on till the end of the
record. And it isn't ever a set amount of
characters. So would that still work?
Just an idle question: As "product description" is a label or identification
of the information that follows, and is the same for each record, do you
really need to extract that, too? Or have I misunderstood and the text you
are moving from the Memo field may contain other types of information in
addition to the description of the product?

Larry Linson
Microsoft Access MVP
Oct 2 '06 #5

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

Similar topics

5
by: Liberal | last post by:
I am looking for the simplest forum, bbs script which has those features? new messages will be displayed only after the administrator reviewed allow users post without signing up display the...
5
by: Alexandre | last post by:
Hi, Im a newb to dev and python... my first sefl assigned mission was to read a pickled file containing a list with DB like data and convert this to MySQL... So i wrote my first module which...
3
by: Joey Martin | last post by:
I have the following link: http://foo.com/accountlogin.asp?refer=contactform.asp?toid=101&itemid=9& itemtype=horse a form field that should read the refer=querystring cuts off after the...
7
by: Neil Ginsberg | last post by:
I'm having some problems with an Access 2000 MDB file with a SQL Server 7 back end, using ODBC linked tables. I previously wrote about this, but am reposting it with some additional information and...
6
by: Jon Davis | last post by:
I like the drag-and-drop accessibility of dragging a table to a Web Forms designer and seeing a SqlDataAdapter automatically created for me.. being able to create a DataSet from that is fun and...
1
by: Dave | last post by:
I have a datagrid in my asp.net page (using VS 2003). One of the columns is bound to a text field. The length of some of these text field values is more than 255 characters but when the grid displays...
4
by: Dave | last post by:
I have a field with data type of memo in my access database. I run a query from c# to access this field and it cuts off my string to only 255 characters. If i run this query directly in access...
8
by: Paul | last post by:
Hi all, I'm probably missing something obvious here, but occasionally the response stream for pages on my site is cutting off leaving incomplete HTML and an ugly page. Response.Buffer is set...
5
by: Roger | last post by:
I have a siebel crm application thats cutting and archiving logs every minute. Here is the db cfg Log buffer size (4KB) (LOGBUFSZ) = 512 Log file size (4KB) ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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,...

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.