Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FUNCTION & SUB PROCEDURE 1

Status
Not open for further replies.

diggermf

Programmer
Jun 16, 2008
20
US
Hi All

Whats the difference between FUNCTION and SUB PROCEDURE?
Please Clarify
 
How are ya diggermf . . .

A function [blue]returns data[/blue], subroutine [blue]does not![/blue] . . .

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Functions may return values.
Subs may not.

[pipe]
Daniel Vlas
Systems Consultant

 
diggermf . . .

BTW: BTW: Welcome to [blue]Tek-Tips![/blue] [thumbsup2] Do have a look at one of the links at the bottom of my post. The links will help you [blue]ask better questions[/blue], get [blue]quick responses[/blue], [blue]better answers[/blue], and insite into [blue]etiquette[/blue] here in the forums. Again . . . Welcome to [blue]Tek-Tips![/blue] [thumbsup2] . . . [blue]Worthy Reading![/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Also, just as something to think about - since a function may, or may not return a value and a sub never returns a value, I would argue that with the exception of the subs you are stuck with using (form and report events), functions could be used exclusively. Plus they have the added bonus of being able to be seen and called in the properties dialog and in the builders (if public).

I just gave a presentation on that at the Seattle Access Users Group on the Microsoft campus last month and at the Portland Access Users Group this month.



Bob Larson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top