Update Query

S

Sarah

I am new to access and am not really familiar with different types of
queries..and am trying not to have to do work in excel before I bring
my data over.

I need the function to take the inch mark out of my data. My column is
Width and the data set shows 85" and I want it to say 85. Do I have to
do an update query to do this?

Replace([Open Orders]![Width],' " ',"") doesnt work.

Replace([Open Orders]![Width]," " ","") doesnt work either.

Help!
 
B

Bob Barrows

Sarah said:
I am new to access and am not really familiar with different types of
queries..and am trying not to have to do work in excel before I bring
my data over.

I need the function to take the inch mark out of my data. My column is
Width and the data set shows 85" and I want it to say 85.

Is that because you want to do math with it? If so, it won't be enough
to strip the quote: you will also need to store it in a field with a
Number datatype

The Val() function seems to be perfect for this:
Select Val([Open Orders].[Width]) from ...
 
J

John Spencer

Try either of these expressions

Replace([Open Orders]![Width],"""","")
Or

Replace([Open Orders]![Width],Chr(34),"")

You can get a quote mark in a string by doubling up the quote mark "" and then
you need to include that inside quotes marks so you end up with """".

You can use the Chr function to get the quote mark Chr(34) is a quote mark.


John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
S

Sarah

Try either of these expressions

     Replace([Open Orders]![Width],"""","")
Or

     Replace([Open Orders]![Width],Chr(34),"")

You can get a quote mark in a string by doubling up the quote mark "" andthen
you need to include that inside quotes marks so you end up with """".

You can use the Chr function to get the quote mark Chr(34) is a quote mark.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County


I am new to access and am not really familiar with different types of
queries..and am trying not to have to do work in excel before I bring
my data over.
I need the function to take the inch mark out of my data. My column is
Width and the data set shows 85" and I want it to say 85. Do I have to
do an update query to do this?
Replace([Open Orders]![Width],' " ',"") doesnt work.
Replace([Open Orders]![Width]," " ","") doesnt work either.
Help!- Hide quoted text -

- Show quoted text -

Thanks for the help!

John, the first expression worked.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top