Huh. Found it. This field originally existed in the current form's record
source table, and I had to remove the record source & add it again; it must
have been retaining some unseen reference to the removed field, because when
I removed the record source, saved the form, re-added the record source, and
it compiled fine.
"Brian" wrote:
> I have an app that is giving me the VBA "Compile error: Member already exists
> in an object module from which this object module derives" error on this
> declaration in a form's module:
>
> Private ScriptFileName As String
>
> However, I have already done the following and am still getting the error:
>
> 1. Verify that there is no control by this name on the form (clue?: this
> variable was originally represented as a bound combo box that was deleted
> from the form before the variable was created)
> 2. Search VBA text (Entire Project) for "ScriptFileName"; the above
> reference is the only time it is dimensioned; it appears again only where its
> value is set via a DLookup.
> 3. Search the entire app (using my standard tool, Rick Risher's Find &
> Replace). That returns only the single reference above.
> 4. Copy the form, delete it, and replace it with the copy.
> 5. Create a new DB and import all objects, including this form.
>
> What else could be causing the error?
|