Lawrenceiow
New member
- Local time
- Today, 07:38
- Joined
- Mar 10, 2006
- Messages
- 5
I have an Access2000 table with over 100,000 records and one of the fields is a text field which might contain a date entry. However, the database where the information comes from uses dots instead of slashes in dates (eg 01.01.2001 instead of 01/01/2001). So I need to replace each dot with a slash.
At the moment I use a macro to import my data (which is in the form of a tab delimited text file) using TransferText and then use 'RunCommand' with 'Replace' which opens the Find and Replace dialog box. I then have to type in . and / and change the 'Look In' to the field in question and change the 'Match' to 'Any Part of Field'.
This all works but is rather a naff way of doing it. I've tried searching these forums for a solution but whilst there are a lot on Search and Replace they are either not what I'm after or are too confusing for me to tell if they're what I'm after.
I've had a go at:
tables![myTable].[comments] = Replace(tables![myTable].[comments],".","/")
but this gives me an error saying Object Required.
I've also had a go with using SQL from various forums but I probably don't know enough about SQL in Access2000 to get it to work.
Please can someone help with a simple solution wether it be an Update Query or a Macro or in a procedure/function in a Module which I can call from the Macro.
At the moment I use a macro to import my data (which is in the form of a tab delimited text file) using TransferText and then use 'RunCommand' with 'Replace' which opens the Find and Replace dialog box. I then have to type in . and / and change the 'Look In' to the field in question and change the 'Match' to 'Any Part of Field'.
This all works but is rather a naff way of doing it. I've tried searching these forums for a solution but whilst there are a lot on Search and Replace they are either not what I'm after or are too confusing for me to tell if they're what I'm after.
I've had a go at:
tables![myTable].[comments] = Replace(tables![myTable].[comments],".","/")
but this gives me an error saying Object Required.
I've also had a go with using SQL from various forums but I probably don't know enough about SQL in Access2000 to get it to work.
Please can someone help with a simple solution wether it be an Update Query or a Macro or in a procedure/function in a Module which I can call from the Macro.