473,396 Members | 2,004 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,396 software developers and data experts.

Multiline address block in ms access 2013 using a query

I have a table with address field and want to have a multi line address block on a form and report. What is the code in a string for line return. Example

First name surname
Address 1
Addess2
Town
County
Post code
May 20 '15 #1
6 3327
zmbd
5,501 Expert Mod 4TB
Shute112:
How is your data stored?

In a single field like:
[First name surname Address 1 Addess2 Town County Post code]

or in a table like:

[First name][surname][Address 1][Addess2][Town][County][Post code]

In the first case you will need to code a function to split out your data. I also highly advise you to redesign your database in this case.

In the second case, place the fields on your report in the desired positions.
May 20 '15 #2
Hi ZMBD

Thanks for coming back to me so quickly. The table consists of separate fields for the name address etc. I have jointed the fields together into one string.

Addr: (+[HouseName]+",") & " " & (+[Address]+", ") & (+[Area]+", ") & (+[Town] & ", ") & [County] & ", " & [Postcode]

but would like to see the address in separate lines like an envelope is addressed. Is there a code to go between the fields to have a line break.

Currently the address appears in one long line and not multiable lines as I indicated in my question. The problem with placing the fields separately onto the report if the customer has not a house name or only one line of address there is a blank space.

Hope this makes sense.

Mike
May 20 '15 #3
Seth Schrock
2,965 Expert 2GB
Instead of concatenating the comma into the string, add Chr(13) & Chr(10)
May 20 '15 #4
Hi Seth

I have tried your Chr(10) but cannot get it to work. Can you please look at the string and see where I should be adding the Chr(10) and if possible could you type it out and I will copy straight into my query.
Addr: (+[HouseName]+",") & " " & (+[Address]+", ") & (+[Area]+", ") & (+[Town] & ", ") & [County] & ", " & [Postcode]

I added the chr(10) as below. Was I right!!!

Addr: (+[HouseName]+Chr(10)) & " " & (+[Address]+"Chr(10) ") & (+[Area]+"Chr(10) ") & (+[Town] & "Chr(10) ") & [County] & "Chr(10) " & [Postcode]

But this did not work.


Mike
May 20 '15 #5
Seth Schrock
2,965 Expert 2GB
You have to have Chr(13) as well.
Expand|Select|Wrap|Line Numbers
  1. Addr: ([HouseName]+Chr(13)+Chr(10)) & ([Address]+Chr(13)+Chr(10)) & ([Area]+Chr(13)+Chr(10)) & ([Town] +Chr(13)+Chr(10)) & ([County]+Chr(13)+Chr(10)) & [Postcode]
May 20 '15 #6
Thanks Seth
Works well. very grateful.
Mike
May 20 '15 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Sasha | last post by:
Hi All, I am new to VB.Net and am having a problem with the below code. I am trying to fill in a datagrid with the below query but it keeps giving me error where the *'s are located below. I...
2
by: dollyvishal | last post by:
How to get constraint information for MS Access tables using Query?
0
by: steveradaza | last post by:
Sir,Good Day..I am a newbie here and i am just learning the usage of microsoft access..can you help me solve my problem in making a running balance in a query of microsoft access 2013 of my In and...
4
by: nomeepk | last post by:
hi, i am using access 2013, Is there a way i can make this Access Database online, so i can access and use it from anywhere in a Browser? Regards.
5
by: jimatqsi | last post by:
I'm looking for information about compatibility between Access 2013 and Access 2003. I've been approached by a firm that wants to begin upgrading their systems. I want to know if it is reasonable...
0
by: LeoVBNET | last post by:
Hi Because VS 2013 dropped SQL COMPACT databases, I need to convert Access 2013 databases into SQL COMPACT in order to be able to use Linq to SQL in VB 2013. Anybody can help me? Thanks
6
by: GKJR | last post by:
I have been using Access 2013 (in Office 365) with Windows 8.1 for about a month and a half now. I was a little reluctant to switch from 2010 on Windows 7, but I figured I should try stay ahead of...
1
by: Goss | last post by:
I have added to the query criteria, and the query runs fine, but when I open the Chart in print view the input box asks me for the month 3 times? any ideas
6
by: msilva100 | last post by:
Hello, I need to have remote access to a MS Access 2013 Database running on a Windows 7 Server. Can someone kindly recommend a remote access tool? Thank you.
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: 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: 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
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...
0
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
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
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...

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.