473,466 Members | 1,324 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

spliting the address line!

Hi
How to split an address field up, when the user has entered it in one field
with each address line separated by carriage return.

I like to have a button, which can be clicked to autofill the address lines
to related controls/fields on the form.

How do I do that?

Regards
Nathan
Aug 21 '06 #1
1 1741
You can use something like this:

Private Sub Command4_Click()
Dim varAddress As Variant
Dim intCounter As Integer

varAddress = Split(Me.Address, vbCrLf)
For intCounter = LBound(varAddress) To UBound(varAddress)
MsgBox "Line (" & intCounter & "): " & varAddress(intCounter)
Next intCounter
End Sub

and then set the value of the various fields. The problem is that
addresses are really inconsistent. Different numbers of lines etc. I
guess you could use the ubound(varArray) function to get the number of
items in the array and then make a decision on how to handle the parts
that way, but it won't be neat and easy.

Aug 21 '06 #2

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

Similar topics

3
by: Ray Paseur | last post by:
Is there a way in PHP or JavaScript to determine the full content of the browser address line, including the information that would tell us if the link were to an internal part of a page? I'm...
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: Tom Warren | last post by:
About once a year or so for the last 10 years, I update my street address parser and I'm starting to look at it again. This parser splits a street address line into its smallest common elements...
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...
2
by: opt_inf_env | last post by:
Hi, I have created a form with hidden variables and submit button which initiate downloading of a new page. After submit-button is pressed and new page is downloaded I can see values of all...
2
by: zamuel | last post by:
I have fairly simple problem. I have a form which shows email address from database on label called 'email'. This address shows as a mailto link, which opens outlook normally. Because the address...
10
by: Chris H | last post by:
Greetings, I'm trying to update an address field with "standard" abbreviations so that I can do a comparison of various accounts to one another on the address. I can update a set of records for...
4
by: ton | last post by:
Hi, I'm opening a modalwebform, in which I use to parameters to show a database record. i do not want that people will see the way I call the record, so I want to hide these variables. I thought...
5
by: pranyht | last post by:
for example if user enters Passing the parseAddress function "A. P. Croll & Son 2299 Lewes-Georgetown Hwy, Georgetown, DE 19947" returns: 2299 Lewes-Georgetown Hwy A. P. Croll & Son Georgetown...
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
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
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
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,...
0
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
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 ...

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.