[AccessD] Function vs Sub

jwcolby jwcolby at colbyconsulting.com
Wed Feb 25 13:19:32 CST 2009


Hmmm... I think I have just been dissed.  It's pretty bad when you aren't even sure if you have been 
dissed.

;)

John W. Colby
www.ColbyConsulting.com


Charlotte Foust wrote:
> What, precision?  I've been studying JC and learning his approach.  ;-> 
> 
> Charlotte Foust
> 
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo
> Sent: Wednesday, February 25, 2009 10:51 AM
> To: 'Access Developers discussion and problem solving'
> Subject: Re: [AccessD] Function vs Sub (was: Classes and Events -
> EVENTSNOT REQUIRED)
> 
>>> 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
> 
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 



More information about the AccessD mailing list