Memo field for Company Address

J

John Baker

Hi:

Somewhere I read that you can use a Memo field for address information, and that all you
need to do is change the way that the system responds to the end of line character, as in:

17 Wistful Vista (end line using the enter key)
BayView, Ca 01810

I tried using the enter key without any changes to anyuthing, and find that I can input an
address successfully, all lined up and all correctly, BUT that when I do a query against
the record all I get is the first line that I entered in the memo field (i.e the "17
Wistful Vista") but not the second or subsequent lines.


Can someone point me in the right direction to make this work please?

best

John Baker
 
A

Allen Browne

Presumably you have set the EnterKeyBehavior of your text box to New Line In
Field, or else you have used Ctrl+Enter to enter the new line.

In your query, put the cursor in this field and press F2.
Is the 2nd line visible now?
You could achieve the same by increasing the row height in the query.

In general, the particular example you gave is not a good idea. For example,
if you might ever want to query by suburb, state, or zip code, it would be
better to have those 3 things in separate fields.
 
J

Jeff Boyce

John

If you "stuff" the entire address into one (memo) field, you will find it
exceedingly difficult to search for all Companies located in CA, or to sort
by zip/postal code, or select all BayView companies for a targeting mailing.

You are attempting to embed more than one fact (delivery address, city,
state/province, postal code) in a single field. This is NOT a good idea in
a relational database design.
 
J

John Baker

Thanks, Guys

I appreciate your point about searching. My real reason for doing this is that I have a
hell of a time setting up a report so that redundant lines are squeezed out of the
address. Perhaps you may have some tips on this area too.

Best

John
 
A

Allen Browne

Sure.

Place text boxes on your report, with Control Source like this:
=[AddressLine1]
=[AddressLine2]
=Trim([City] & " " & [State] & " " & [Zip]

Set the CanShrink property of the text boxes to Yes, and they will disappear
if there is no data.

If you don't want the Detail section of the report to shink also (e.g. for
labels, where the height must be the same for each record), make sure the
CanShirnk property of the Detail section is set to No.

BTW, if you need to have a label beside these, but want that to shrink also
if there is no data, change the label into a text box, and give it a Control
Source like this:
=IIf([AddressLine2] Is Null, Null, "Address Line 2:")
 
M

Mike Painter

John said:
Hi:

Somewhere I read that you can use a Memo field for address
information, and that all you need to do is change the way that the
system responds to the end of line character, as in:

17 Wistful Vista (end line using the enter key)
BayView, Ca 01810

I tried using the enter key without any changes to anyuthing, and
find that I can input an address successfully, all lined up and all
correctly, BUT that when I do a query against the record all I get is
the first line that I entered in the memo field (i.e the "17 Wistful
Vista") but not the second or subsequent lines.


Can someone point me in the right direction to make this work please?

Brown's idea to set the can shrink property is probably the best solution.
Not being able to sort on the zip code will cost you time and money if you
are doing any sort of bulk mail.

Just don't open the closet door.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top