473,656 Members | 2,997 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Macro for splitting a field?

I'm new, hope I describe my dilemma ok. I've got a large DB from the
County. They have
the "house Number" in the same field as the Street Name. It is always
the 1st 4 characters followed
by a space. I need to grab the House number and put it in it's own
field as well as removing it from
it's existing field. What software that works with DB allows me to do
that? Any help appreciated.

--
Tks Izod
Feb 17 '07 #1
2 1523
"Izod" <No************ **@tampabay.rr. com.invalidwrot e in
news:45******** **************@ roadrunner.com:
I'm new, hope I describe my dilemma ok. I've got a large DB
from the County. They have
the "house Number" in the same field as the Street Name. It
is always the 1st 4 characters followed
by a space. I need to grab the House number and put it in
it's own field as well as removing it from
it's existing field. What software that works with DB allows
me to do that? Any help appreciated.
First of all, why? the house number is part of the address, and
should stay there.

If you need just the street, for sorting, for example, just
create a query that contains the calculated field

Street: mid([table name].[address],6)

and use the query instead of the table in your forms and reports
If you do have a valid reason for getting the house number, use

HouseNum: mid([table name].[address],1,5)

You don't need no stinking macro. :-)

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Feb 17 '07 #2
Hey.... Thanks a ton, You guys have helped me immensely...... .

IZOD

"Bob Quintal" <rq******@sPAmp atico.cawrote in message
news:Xn******** **************@ 66.150.105.47.. .
"Izod" <No************ **@tampabay.rr. com.invalidwrot e in
news:45******** **************@ roadrunner.com:
>I'm new, hope I describe my dilemma ok. I've got a large DB
from the County. They have
the "house Number" in the same field as the Street Name. It
is always the 1st 4 characters followed
by a space. I need to grab the House number and put it in
it's own field as well as removing it from
it's existing field. What software that works with DB allows
me to do that? Any help appreciated.
First of all, why? the house number is part of the address, and
should stay there.

If you need just the street, for sorting, for example, just
create a query that contains the calculated field

Street: mid([table name].[address],6)

and use the query instead of the table in your forms and reports
If you do have a valid reason for getting the house number, use

HouseNum: mid([table name].[address],1,5)

You don't need no stinking macro. :-)

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Feb 17 '07 #3

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

Similar topics

3
4128
by: Rakesh | last post by:
Hi, I was 'googling' to look out for some ways of optimizing the code and came across this term - 'hot / cold splitting'. In short, the discussion is about splitting heavily accessed ( hot ) portions of data structure from rarely accessed cold portions. I haven't used this one myself anytime before, but am interested in learning more about this. Can you please share your experience here, so that I can understand better and this could...
2
1690
by: Johan | last post by:
Hi, Can somebody help me with this problem : I have the following member functions #define FUNC(x) get##() class A { the declarations etc, etc.
5
24187
by: Carl | last post by:
Please can anyone tell me how I can create a macro to save the results of a query as an excel file? The query is called Student List and I would like to save it to "My Documents". We have had some problems with our database crashing. We would therefore like another way to have access to basic student data and thought we automatically save the results of this query when we close Access. Any suggestions on how we could do this would be...
0
1617
by: samuel | last post by:
Hi I wrote a macro in MS Access 2000. This is a .adp link on SQL server tables. I have 2 forms: script_selection & Form3 Form3 include 2 important fields: CD & line I want to write a macro who will be run when I click on a field (line) in
5
1773
by: ziyan | last post by:
Hello all, I'm trying to write a macro that will let me access the fields of a struct variable, given the field name as a parameter. I tried the follwing which produces the desired result when run thru gnu cpp, but it complains and stops. #define ref(var,field) var. ## field struct mystruct {
14
2055
by: Malcolm | last post by:
Hi, I have the following which fails with "disagreement in number of macro arguments" when compiling with Imagecraft ICCAVR. Has anyone got any ideas - its not vital but would make the code a lot nicer to read: #define SET(x,y) (x |=(1<<y)) #define PIEZO PORTB,5
2
3490
by: srinu.fsl | last post by:
there's a MACRO call : MACRO1(cnf) and its expansion is : #define MACRO1(cnf) (((cnf) != TRUE)? (CLEANUP(FAIL)):(err = SUCCESS)); #define CLEANUP(a)
8
3436
by: Net | last post by:
Hi Please help. I have a database which requires a message to come up when certain part numbers are added to it. I have solved part of this by using a conditional macro eg = 54125 and using a msg box. This works fine until a part no. which contains a letter is used eg B6541. Access changes the criteria in the condition box to Part No]= and won't let me take the parameter boxes out. If I leave them in I get an error message "type...
4
3817
by: Steven D'Aprano | last post by:
I'm trying to split a URL into components. For example: URL = 'http://steve:secret@www.domain.com.au:82/dir" + \ 'ectory/file.html;params?query#fragment' (joining the strings above with plus has no significance, it's just to avoid word-wrapping) If I split the URL, I would like to get the following components:
0
8296
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8497
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8598
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7310
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4150
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2721
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 we have to send another system
2
1928
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1598
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.