u0***@hotmail.com (Uttam) wrote in message news:<77*************************@posting.google.c om>...
Hello,
How does one suppress the "Object already exists" message when the
following statement is executed in ADO?
cat.Views.Append "Some_Query", cmd
Thanks in advance.
Uttam
Delete the View before appending and suppress the "object doesn't
exist" error, then append. If you put something like On Error Resume
Next or whatever in the code, the errors should just get ignored. If
it returns a numeric error, you can just trap for that error and
continue.
if Err.Number= lngSomeNumber Then
Err.Clear
Resume Next
End if
(Yeah, I know, I prolly butchered the syntax.)