Max Wanadoo
max.wanadoo at gmail.com
Wed Feb 25 12:51:23 CST 2009
>> Sorry for not being precise Won't get you far on this List, Charlotte! Max Laugh more than cry. Smile more than frown. Be generous in spirit. And always stand your round in the pub! -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: 25 February 2009 16:37 To: accessd at databaseadvisors.com Subject: Re: [AccessD] Function vs Sub (was: Classes and Events - EVENTS NOT REQUIRED) Hi Charlotte OK, I see what you mean. I was talking about the value of that property. Sorry for not being precise. /gustav >>> cfoust at infostatsystems.com 25-02-2009 17:08 >>> No it doesn't, it's setting a property of the event. That isn't the same thing as returning a value as does a function. Subs are quite capable of setting values or they wouldn't be as useful as they are. They do NOT return a value directly however. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, February 24, 2009 11:56 PM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Function vs Sub (was: Classes and Events- EVENTSNOTREQUIRED) 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 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com