Hello
Does anbody know some code to get a handle of an access database, select a table in the DB , get a column and replace every value in the column it finds.
So far i have this code ( which has been developed by a third party ) . I was under the impression you can run a query on an access table at any time, but as this is the first time i have done this, i am having trouble. I already have access to the access DB, and here is the rest of the code…
'Open Access file
Set oAccess = CreateObject(“Access.Application”)
oAccess.OpenCurrentDatabase ddDoc.NotesDirectory(0) & ddDoc.NotesFilename(0)
On Error Goto ErrorHandler
'Run query to replace = with - " PROD is the table column name
STR1 = "Replace(PROD, “=”,”-“)"
oAccess.DoCmd.RunSQL(STR1)
Cleanup:
On Error Resume Next
Set dbs = Nothing
oAccess.CloseCurrentDatabase