There is no Replace function in Access 97. Access 2000 was the first version with a built-in Replace(). You need to write the Replace function by your own or you use a userdefined function from the internet like this one, it is stable and extremely fast, faster than VB6 (?) and Access 2000:
http://vb-tec.de/replace.htm
"Confused designer" wrote:
> Hi everybody!
> Please, can anybody tell me how to solve this problem? I've written a procedure for opening data from a file, make some changes in this file and then save it to the disk for later import into a table.
> This is the code that enables this:
> Set oFileSystem = CreateObject("Scripting.FileSystemObject")
> Set OpenText = oFileSystem.OpenTextFile("Dane.txt", ForReading, False)
> Do While Not OpenText.AtEndOfLine
> Dim liniatemmp As String
> liniatemmp = OpenText.ReadLine
> ....
> Loop
>
> Everything works OK in Access 2002, but when compilled in Access 97, I get an error in the line replacing "," with ";" .....
> How to do that in Access 97?
> Any help will be appreciated.
> liniatemmp = Replace(liniatemmp, Chr(44), Chr(59))