By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,650 Members | 1,976 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,650 IT Pros & Developers. It's quick & easy.

REMOVING '/' IN A FIELD RECORD USING ACCESS CODE

P: n/a
I have a problem of removing '/' in Access. I have a field [RegNo]
with this record BD/02/1234. I want to automatically remove the '/'
and save it in a new field record [StuPicture] for another purpose.
Presently this is done in Excel. I am using Access 2000. Any Access
VBA codes to remove this '/' will be appreciated.

Nov 13 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Replace("BD/02/1234", "/", "")

will do it. Replace "BD/02/1234" with the field name you are wanting to
modify. However, there may be a bit of a trick to using this in Access 2000.
While Access 2000 was the first one with Replace, it would work in VBA but
not in Queries. To work around this, you may need to make your own function
in a VBA module, use replace there, and call your function from the query. I
don't know if this problem still exists or not if you have a fully patched
version of Access 2000 (all Office, Jet, and MDAC patches installed). So,
you may not run into this problem. Try using the function directly in the
query first, if it doesn't work, then you'll need to make the "wrapper"
function and call that one.

--
Wayne Morgan
MS Access MVP
"hendafe" <he*****@yahoo.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
I have a problem of removing '/' in Access. I have a field [RegNo]
with this record BD/02/1234. I want to automatically remove the '/'
and save it in a new field record [StuPicture] for another purpose.
Presently this is done in Excel. I am using Access 2000. Any Access
VBA codes to remove this '/' will be appreciated.

Nov 13 '05 #2

P: n/a
hendafe wrote:
I have a problem of removing '/' in Access. I have a field [RegNo]
with this record BD/02/1234. I want to automatically remove the '/'
and save it in a new field record [StuPicture] for another purpose.
Presently this is done in Excel. I am using Access 2000. Any Access
VBA codes to remove this '/' will be appreciated.


The function name for this action is Replace(). It should be in the Help.

--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
I prefer human mail above automated so in my address
replace the queue with a tea
Nov 13 '05 #3

P: n/a
Use the Instr() and Mid() functions to parse the component strings and then
concatenate...

Tony D'Ambra
Web Site: aadconsulting.com
Web Blog: accessextra.net

"hendafe" <he*****@yahoo.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
I have a problem of removing '/' in Access. I have a field [RegNo]
with this record BD/02/1234. I want to automatically remove the '/'
and save it in a new field record [StuPicture] for another purpose.
Presently this is done in Excel. I am using Access 2000. Any Access
VBA codes to remove this '/' will be appreciated.

Nov 13 '05 #4

P: n/a
Use the Instr() and Mid() functions to parse the component strings and then
concatenate...

Tony D'Ambra
Web Site: aadconsulting.com
Web Blog: accessextra.net

"hendafe" <he*****@yahoo.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
I have a problem of removing '/' in Access. I have a field [RegNo]
with this record BD/02/1234. I want to automatically remove the '/'
and save it in a new field record [StuPicture] for another purpose.
Presently this is done in Excel. I am using Access 2000. Any Access
VBA codes to remove this '/' will be appreciated.

Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.