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

Access Help Seperating

My problem is that i have an adress field Ex: 1409 State St. i need the 1409 and the State St to be seperate. Im new to Acess and was more or less given the database and told to use it. not really sure where to go. Thanks a bunch if anyone can help me.
Aug 17 '07 #1
5 1173
Stwange
126 Expert 100+
My problem is that i have an adress field Ex: 1409 State St. i need the 1409 and the State St to be seperate. Im new to Acess and was more or less given the database and told to use it. not really sure where to go. Thanks a bunch if anyone can help me.
Don't double post again.
Expand|Select|Wrap|Line Numbers
  1. Private Function separateAddress(ByVal address As String)
  2.     Dim i As Integer
  3.     i = 1
  4.     Do While IsNumeric(Left$(address, i)) And Mid$(address, i, 1) <> ""
  5.         i = i + 1
  6.     Loop
  7.     i = i - 1
  8.     If i <> 0 Then MsgBox "Number: " & Mid$(address, 1, i - 1) & ", Street: " & Mid$(address, i + 1)
  9. End Function
Aug 17 '07 #2
missinglinq
3,532 Expert 2GB
And if the address is, for instance, 221 B Baker Street? Or even worse,
221B Baker Street!

Welcome to TheScripts, mrmoo2525!

Linq ;0)>
Aug 17 '07 #3
Stwange
126 Expert 100+
And if the address is, for instance, 221 B Baker Street? Or even worse,
221B Baker Street!
Point taken, in that case maybe parsing for the first string would be better than looking for numeric. The first example is worse though.

If he could provide a parse rule for his system, eg.
The address will be either the second or third "word" onwards, but must start with at least two letters, eg. 12 B The Ferns or 12B The Ferns, but never 12 BA The Ferns?
Aug 17 '07 #4
missinglinq
3,532 Expert 2GB
Parsing addresses is always a hairball! No matter how many rules you set up, something will always come along that doesn't fit into any of the pidgeon-holes you've designed! When it comes to addresses the possibilities are endless! So you set up the rules like you suggested"
The address will be either the second or third "word" onwards, but must start with at least two letters, eg. 12 B The Ferns or 12B The Ferns, but never 12 BA The Ferns?
Then what happens if instead of 221 B Baker Street it's 221 Apt B Baker Street? In the end you do, indeed, have to decide on a set of rules, and after you've done the automatted conversion, go back in and manually inspect each address.
Aug 17 '07 #5
I thank ALL of you who responded to my thread.
My next question is how I execute the thread. Via SQL Query? Very new to access and more specific instructions would be much appreciated!
Thanks.
Aug 17 '07 #6

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

Similar topics

0
by: sedefo | last post by:
I ran into this Microsoft Patterns & Practices Enterprise Library while i was researching how i can write a database independent data access layer. In my company we already use Data Access...
63
by: Jerome | last post by:
Hi, I'm a bit confused ... when would I rather write an database application using MS Access and Visual Basic and when (and why) would I rather write it using Visual Studio .Net? Is it as easy...
13
by: bill | last post by:
I am trying to convince a client that dotNet is preferable to an Access project (ADP/ADE). This client currently has a large, pure Access MDB solution with 30+ users, which needs to be upgraded....
1
by: Dave | last post by:
Hello NG, Regarding access-declarations and member using-declarations as used to change the access level of an inherited base member... Two things need to be considered when determining an...
0
by: alkatraz | last post by:
I'm using the Order Entry DB that the Access XP wizard creates for you.I'm a novice user and the db is perfect for what I need, EXCEPT it only has one field for Sales Tax and I need to have two...
13
by: Simon Bailey | last post by:
I am a newcomer to databases and am not sure which DBMS to use. I have a very simplified knowledge of databases overall. I would very much appreciate a (simplifed) message explaining the advantages...
13
by: Arno R | last post by:
Hi all, I will have to handle a lot of really 'nice' data in a LOT of Excel sheets. It is all about music files (Billboard top 100) I am afraid there really is a sheet for every year ... (Don't...
6
by: Jo K. | last post by:
I have a bounded field called Name. It's used to type in the full name of a customer (intentionally set up that way instead of seperating the first and last names) I would like to be able to...
8
by: John | last post by:
Hi What are the advantages of writing an app in vb.net/ado.net as opposed to MS Access? I need this to sell the idea to the management. Many Thanks Regards
2
by: ctate | last post by:
I have a query in sql as below - where the scan result feild is a memo feild with multiplue lines of data seperated by carriage returns. The is no common delimiter at the end of the field (apart...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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
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,...
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...

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.