Senin, 22 Maret 2021

Re: [MSAccessProfessionals] Going through Book.

JasonM has a FAQ on the subject:


http://baldyweb.com/SubFunction.htm


Paul
Sent via mobile device


-------- Original message --------
From: Bill Singer <Bill.Singer@at-group.net>
Date: 3/22/21 12:36 PM (GMT-08:00)
To: MSAccessProfessionals@groups.io
Subject: [MSAccessProfessionals] Going through Book.

Can someone help me to understand this.

 

I am going through the book Access 2010 VBA programming Inside Out and I come across to ways to do the same thing  (I believe).

 

I am trying to understand the difference between FUNCTIONS  and SUB ROUTINES and whey the first statement is different (and when to use each).

 

Here is the Sub example.

Sub modIF_IF_Simple(Rating As Long)

 

Here is the Function Example

Function modIF_IF1(Rating As Long) As String

 

What is the difference and why is the "As String" needed at the in the function and not the sub.

 

Thanks,

Rookie,

Bill Singer

Minnesota

Access 365

Tidak ada komentar:

Posting Komentar