473,511 Members | 13,105 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Automatic removes data

I want to have a query that removes all dashes for a field
named "item name"
But I don't want to delete the dashes from the table.
What do I have to write in the query?
Thanks
Nov 12 '05 #1
3 1705
Since you haven't mentioned which version of Access you're using, I'll
assume the latest.

NoHyphens:Replace([ItemName],"-","")

--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.
"Jacky11" <my*****@hotmail.com> wrote in message
news:46**************************@posting.google.c om...
I want to have a query that removes all dashes for a field
named "item name"
But I don't want to delete the dashes from the table.
What do I have to write in the query?
Thanks

Nov 12 '05 #2
Thanks for your response
I have Access 2000
The only thing I want to remove is the –
The above code didn't work for me.

"Fredg" <fg******@att.net> wrote in message news:<p%***********************@bgtnsc04-news.ops.worldnet.att.net>...
Since you haven't mentioned which version of Access you're using, I'll
assume the latest.

NoHyphens:Replace([ItemName],"-","")

--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.

Nov 12 '05 #3
Jacky,
This will work in all versions of Access.

Copy and Paste the following function into a Module.

Function RemoveChar(FieldIn As String) As String

Dim intX As Integer
Dim intY As Integer
intY = 1
Dim NewString As String

intX = InStr(1, FieldIn, "-")
Do While intX <> 0
NewString = NewString & Mid(FieldIn, intY, intX - intY)
intY = intX + 1
intX = InStr(intY, FieldIn, "-")
Loop
NewString = NewString & Mid(FieldIn, intY, Len(FieldIn) - intY + 1)
RemoveChar = NewString

End Function
======

You can call it from a query:
NoHyphens:RemoveChar([ItemName])

--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.
"Jacky11" <my*****@hotmail.com> wrote in message
news:46**************************@posting.google.c om...
Thanks for your response
I have Access 2000
The only thing I want to remove is the -
The above code didn't work for me.

"Fredg" <fg******@att.net> wrote in message

news:<p%***********************@bgtnsc04-news.ops.worldnet.att.net>...
Since you haven't mentioned which version of Access you're using, I'll
assume the latest.

NoHyphens:Replace([ItemName],"-","")

--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.

Nov 12 '05 #4

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

Similar topics

0
2431
by: Rasmus Fogh | last post by:
Someone raised the question of automatic code generation a few weeks back. And yes, we (CCPN) are using automatic Python code generation in a major way. Basically we are making data models in...
4
1471
by: Hallvard B Furuseth | last post by:
Is it possible to write a metaclass or something so that with a class definition not much larger than this: class foo: def __init__(self, val): self.val = val operations on a foo instance f...
16
2063
by: gaudetteje | last post by:
I just read in the 'What's New in Python 2.4' document that the None data type was converted to a constant: http://python.org/doc/2.4/whatsnew/node15.html """ # None is now a constant; code...
28
3308
by: joe | last post by:
I have a simple .NET application with two or three listViews which are filled with icons and when the user click on the proper item, they display the related images. I use "image = null ; " for all...
3
2874
by: ivanhoe | last post by:
I need something like html tidy, but for javascript...to fix code indentation, converts tab/spaces, removes white space, etc...maybe even fast check sintax and warn on compatibility issues, but I...
3
2098
by: Oscar Thornell | last post by:
Hi, I am looking for a feature/functionality in VS.NET 2005 that removes using directives/includes of unnecessary namespaces. IDEs like Eclipse and JBuilder have had stuff like that for years...
3
1454
by: gwainguard | last post by:
Hello I am studying the ECMA specs and was doing wonderfully until just now. They have just broached the topic of AMM and given some example code which seems to be demanding a greater understanding...
58
4608
by: Jorge Peixoto de Morais Neto | last post by:
I was reading the code of FFmpeg and it seems that they use malloc just too much. The problems and dangers of malloc are widely known. Malloc also has some overhead (although I don't know what is...
25
2623
by: sidd | last post by:
In the following code: int i = 5; ---it goes to .data segment int j; ---it goes to bss segment int main() { int c; int i = 5; ---stack
0
7144
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
7356
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
7427
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
7512
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
5671
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
4741
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
3214
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1577
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 ...
0
449
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...

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.