Compiling help

NWGal
2StarLounger
Posts: 198
Joined: 21 Aug 2011, 02:32

Compiling help

Post by NWGal »

I am trying to save my front end db as an accde file so that can share it without end users being able to make structural changes. I get this message "Access was unable to create the .accde..." I looked around online and found a solution that said I should open the vba editor to debug and compile. This I did but when I do I get a compile error, Method or data member not found in a piece of code I don't recognize and can't find anywhere. I am not getting any error messages when I open and use any of my forms, so this really is confusing.
Help

User avatar
HansV
Administrator
Posts: 78628
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Compiling help

Post by HansV »

Can you tell us which line of code caused the error?
Best wishes,
Hans

NWGal
2StarLounger
Posts: 198
Joined: 21 Aug 2011, 02:32

Re: Compiling help

Post by NWGal »

HansV wrote:Can you tell us which line of code caused the error?
Private Sub ConId_AfterUpdate()
Me.RoleID = Me.ConID.Column(2)
End Sub

User avatar
HansV
Administrator
Posts: 78628
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Compiling help

Post by HansV »

Possible causes:
- There is no control named RoleID
- The control ConID does not have columns, i.e. it is not a combo box or list box.
Best wishes,
Hans

NWGal
2StarLounger
Posts: 198
Joined: 21 Aug 2011, 02:32

Re: Compiling help

Post by NWGal »

HansV wrote:Possible causes:
- There is no control named RoleID
- The control ConID does not have columns, i.e. it is not a combo box or list box.
That is what is so weird. I wouldn't have written a piece of code like this so I can't figure out where this is coming from!
Why would debugging find code I haven't written?

User avatar
HansV
Administrator
Posts: 78628
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Compiling help

Post by HansV »

Someone must have created the code, either manually or by using one of the control wizards in Access...
Best wishes,
Hans