Invalid Outside Procedure (1 Viewer)

D

DataFreak

Guest
I've sucessfully done 'search' and 'reset search' buttons in a previous database with no trouble. However, in my new creation, I can't get the reset (filter off) button to work. It throws up an Invalid Outside Procedure error and I'm really stumped to know what to do about it.

My search button on-click refers to a search macro, that applies a filter based on a query. That works fine.

The reset button just has an on-click event procedure consisting of:

me.filteron = false

As far as I can tell, its identical to the previous database but doesn't work. And to be honest, I'm not entirely sure exactly what the error message means...

I'm kinda new to Access and learning as I go along so please be gentle with me!
 

yellow

Registered User.
Local time
Today, 07:56
Joined
May 16, 2002
Messages
122
Try deleting your search button and the code behind it. Redraw it and then put the code back into the on click event.

If that doesn't work look up Invalid Outside Procedure in Access help.
 
D

DataFreak

Guest
Thanks Yellow,

I've actually tracked down the problem. I had a rogue 'End Sub' floating around in the code builder.

Now, at least, I know what the error message refers to (Access help was of no help whatsoever!)
 

John Funk

New member
Local time
Today, 02:56
Joined
Jul 25, 2009
Messages
1
The last message posted 7 years ago referred to an older version of Access and indicated that Access Help did not help. The problem was indeed a rogue 'end sub'. Using Office 2007... very pretty but the Help Message is still of no help. This forum, however, was helpful !
 

mcbris40

New member
Local time
Today, 16:56
Joined
Dec 28, 2010
Messages
1
The last message posted 7 years ago referred to an older version of Access and indicated that Access Help did not help. The problem was indeed a rogue 'end sub'. Using Office 2007... very pretty but the Help Message is still of no help. This forum, however, was helpful !

Here we are 2011 still Access Help did not help with the very same problem "INVALID OUTSIDE PROCEDURE" and same solution being a rogue "End Sub" This forum, however, was helpful !:cool:
 

Dick7Access

Dick S
Local time
Today, 02:56
Joined
Jun 9, 2009
Messages
4,201
Thanks Yellow,

I've actually tracked down the problem. I had a rogue 'End Sub' floating around in the code builder.

Now, at least, I know what the error message refers to (Access help was of no help whatsoever!)

Look how that post is, and it still help me, I just had the same thing!
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 07:56
Joined
Sep 12, 2006
Messages
15,641
they are all similar thnigs

using end sub/end function the wrong way round
missing end if
return without go sub

the compiler/syntax checker picks them all up, but returns suitably vague answers in many cases. debug/compile will tend to home in on the dodgy code.
 

Users who are viewing this thread

Top Bottom