Gustav Brock
Gustav at cactus.dk
Wed Feb 25 01:56:12 CST 2009
Hi Charlotte Eh, you can't have forgotten that setting Cancel to True in your code of such a sub will return that value to the form? /gustav >>> cfoust at infostatsystems.com 24-02-2009 22:21 >>> Not sure I follow, Stuart. Subs set values like Cancel or process a keycode. They don't return them per se. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Tuesday, February 24, 2009 1:12 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Function vs Sub (was: Classes and Events - EVENTSNOTREQUIRED) Which begs the question, why does VBA use Subs for event procedures which return values such as Cancel or KeyCode? Aren't these Functions? :-) -- Stuart On 24 Feb 2009 at 9:24, Charlotte Foust wrote: > Absolutely when you need multiple return values, but a simple boolean or > single value? > > Charlotte Foust