G
Gina
I am trying to clean up some data in a field. Some of the field
records have characters at the end of it which are enclosed in square
brackets thus:
The quick brown fox [ABC 321]
I am using a VBA code to strip out everything to the left of the first
square bracket and overwrite the field. I can't get the code to work
so have extracted the code into query mode for testing.
The first part, identifying those records which contain the " [ "
works OK
SELECT DISTINCTROW tblImport.fldFilmTitle
FROM tblImport
WHERE (((tblImport.fldFilmTitle) Like "*[[]*"));
but when I change this to the update query as follows:
UPDATE DISTINCTROW tblImport SET tblImport.fldFilmTitle =
Left("fldFilmTitle",InStr(1,"fldFilmTitle",'[[]')-1)
WHERE (((tblImport.fldFilmTitle) Like "*[[]*"));
I get an invalid procedure call. Where is my syntax going wrong?
Gina
records have characters at the end of it which are enclosed in square
brackets thus:
The quick brown fox [ABC 321]
I am using a VBA code to strip out everything to the left of the first
square bracket and overwrite the field. I can't get the code to work
so have extracted the code into query mode for testing.
The first part, identifying those records which contain the " [ "
works OK
SELECT DISTINCTROW tblImport.fldFilmTitle
FROM tblImport
WHERE (((tblImport.fldFilmTitle) Like "*[[]*"));
but when I change this to the update query as follows:
UPDATE DISTINCTROW tblImport SET tblImport.fldFilmTitle =
Left("fldFilmTitle",InStr(1,"fldFilmTitle",'[[]')-1)
WHERE (((tblImport.fldFilmTitle) Like "*[[]*"));
I get an invalid procedure call. Where is my syntax going wrong?
Gina