473,382 Members | 1,357 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,382 software developers and data experts.

How to use one line in an address

I am writing a query in Access2000 just with entries from one table.
One of my entries is Cust, for the Customer and the table is in the
data type of a memo with the customer's info set up like this:

Name
address
town
phone #

How can I set the criteria so that the query only comes back with the
first line? Thank you.

Nov 13 '05 #1
6 1478
Are you saying that all of that information, including Carriage Return/Line
Feeds, is being stored in a single field? If there's a chance to change your
design so that the address fields are properly normalized, do it!

To get everything up to the first Carriage Return/Line Feed, try

Left([AddressField], InStr([AddressField], Chr(13) & Chr(10)) - 1)

(change AddressField to the appropriate name)

If there's a chance that some of the fields don't have the Carriage
Return/Line Field combo in them, try

IIf(InStr([AddressField], Chr(13) & Chr(10)) = 0, [AddressField],
Left([AddressField], InStr([AddressField], Chr(13) & Chr(10)) - 1))

(all on one line)

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Rastamon" <Ra*********@gmail.com> wrote in message
news:11*********************@l41g2000cwc.googlegro ups.com...
I am writing a query in Access2000 just with entries from one table.
One of my entries is Cust, for the Customer and the table is in the
data type of a memo with the customer's info set up like this:

Name
address
town
phone #

How can I set the criteria so that the query only comes back with the
first line? Thank you.

Nov 13 '05 #2

"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:zr********************@rogers.com...
Are you saying that all of that information, including Carriage
Return/Line Feeds, is being stored in a single field? If there's a chance
to change your design so that the address fields are properly normalized,
do it!


What does seperating the address fields have to do with normalization?
Nov 13 '05 #3
My table field is called Cust, it is set up as a memo. In the form,
when I come to that field I manually type:

Name (Carriage return)
Address (carriage Return)
Town, zip (Carriage Return)
Phone Number (Tab over to the next field)

Nov 13 '05 #4
"Mike Turco" <mi*******@yahoo-no-spam-4-me.com> wrote in message
news:030Zd.108846$bu.69757@fed1read06...

"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:zr********************@rogers.com...
Are you saying that all of that information, including Carriage
Return/Line Feeds, is being stored in a single field? If there's a chance
to change your design so that the address fields are properly normalized,
do it!


What does seperating the address fields have to do with normalization?

One of the rules of database normalization is that a field holds only a
single piece of data. Having multiple pieces of data (address, town, phone
number, etc.) in a single field is a violation of that rule.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


Nov 13 '05 #5
rkc
Mike Turco wrote:
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:zr********************@rogers.com...
Are you saying that all of that information, including Carriage
Return/Line Feeds, is being stored in a single field? If there's a chance
to change your design so that the address fields are properly normalized,
do it!

What does seperating the address fields have to do with normalization?


Define address.
Nov 13 '05 #6
One of the rules of database normalization is that a field holds only a single piece of data. Having multiple pieces of data (address, town, phone number, etc.) in a single field is a violation of that rule.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


OK, I am self taught I didn't realize that. I will separate the
address into fields, thanks for the tip.

Nov 13 '05 #7

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

Similar topics

0
by: st | last post by:
Hi, Given that I've split a string into its line components, how would I build up a multi-line cell using xmlDocument? What I want to end up with is something like: Address ======= First...
65
by: Skybuck Flying | last post by:
Hi, I needed a method to determine if a point was on a line segment in 2D. So I googled for some help and so far I have evaluated two methods. The first method was only a formula, the second...
0
by: st | last post by:
Hi, Given that I've split a string into its line components, how would I build up a multi-line cell using xmlDocument? What I want to end up with is something like: Address ======= First...
4
by: News | last post by:
Hi Everyone, The attached code creates client connections to websphere queue managers and then processes an inquiry against them. The program functions when it gets options from the command...
12
by: pmonreal | last post by:
I am developing a simple report that lists Name, Address, Home Phone, Cell Phone and eMail address. The format is like the “Address Cards” format in Outlook (see below). Many of the people on the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.