PC Review


Reply
Thread Tools Rate Thread

Compile error: member already exists

 
 
=?Utf-8?B?QnJpYW4=?=
Guest
Posts: n/a
 
      28th Apr 2006
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?
 
Reply With Quote
 
 
 
 
=?Utf-8?B?QnJpYW4=?=
Guest
Posts: n/a
 
      28th Apr 2006
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?

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Compile Error: Method or data member not found Allen Browne Microsoft Access Form Coding 0 30th Jan 2010 04:12 AM
Compile Error : method or data member not found Mehran52 Microsoft Access 6 17th Nov 2008 12:41 PM
Data Member Not Found Error on Compile JB Microsoft Access Form Coding 1 21st Jul 2006 07:46 PM
Reflection: Member not found error, but member exists---help. phrankbooth@hotmail.com Microsoft Dot NET Framework 2 22nd Nov 2005 08:23 PM
MVB error- compile error method or data member not found =?Utf-8?B?anZiNzA=?= Microsoft Word Document Management 0 29th Jul 2005 05:39 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:11 PM.