Error number 16 - Expression too complex

I just had this problem.  I have no idea as to what caused this.   This one is really weird as I'm using the following code to execute startup code after verifying the references.

Access.Application.Eval ("fcnAutoExec2()")

The above was successfully executed but it returned the above error. See Subject: INFO: How to guarantee that references will work in your applications for why I'm using this.

Decompiling fixed this problem.     As did putting a stop statement in the fcnAutoExec2 and removing it.  Weird, really weird.   

The Decompile or how to reduce Microsoft Access MDB/MDE size and decrease start-up times has been updated accordingly.

Published Fri, Feb 22 2008 18:00 by Tony
Filed under:

Comments

# re: Error number 16 - Expression too complex

Hi Tony,

Funny you should mention this. Just last week I experienced a similar (possibly the same?) error number. I was getting a very strange error as soon as I hit the End Sub statement in a combo box AfterUpdate procedure that called a function in a stand-alone module:

Private Sub Country_NotInList(NewData As String, Response As Integer)

   Response = Append2Table(Me.Country, NewData)

End Sub

The function being called was Allen Browne's code to add a new value to a lookup table, when a user types it into a combo box. The function was working fine. In break mode, one could see that the error was raised as soon as the End Sub line shown above was run. The new data was added to the table correctly. One of the first things I tried was a decompile, which fixed the problem, so I was no longer able to document the exact error number.

Also related is this tip from FMS, where they talk about Error 49 getting fixed with a decompile:

www.fmsinc.com/.../Bad_DLL_Calling_Convention.asp

Tom

Saturday, February 23, 2008 2:18 AM by Tom Wickerath

# re: Error number 16 - Expression too complex

Tom, Bad DLL Calling Convention is already mentioned on the decompile page.

Saturday, February 23, 2008 2:38 AM by Tony

Leave a Comment

(required) 
(required) 
(optional)
(required)