[AccessD] Passing a form byval

MartyConnelly martyconnelly at shaw.ca
Fri Sep 22 12:54:08 CDT 2006


Passing a parameter in a call is passed ByRef as default
otherwise need to specify ByVal . Computer languages differ on this
default.

Function testA(ctlR As Control, ByVal ctlV As Control, _
              strR As TextBox, ByVal strV As TextBox) As Long
'control is combobox
Debug.Print ctlR.Column(0)
Debug.Print ctlV.Column(0)
'Textbox needs focus
strV.SetFocus
Debug.Print strV.Text
strR.SetFocus
Debug.Print strR.Text
End Function

Martin Reid wrote:

>I need to pass a text control on a form to a procedure byval as opposed to byref as byref errors out. How can I pass this to the procedure byval?
> 
>Martin
> 
>Martin WP Reid
>Training and Assessment Unit
>Riddle Hall
>Belfast
> 
>tel: 02890 974477
> 
> 
>  
>
>------------------------------------------------------------------------
>
>No virus found in this incoming message.
>Checked by AVG Free Edition.
>Version: 7.1.405 / Virus Database: 268.12.6/453 - Release Date: 20/09/2006
>  
>

-- 
Marty Connelly
Victoria, B.C.
Canada




More information about the AccessD mailing list