ByVal / ByRef 
Author Message
 ByVal / ByRef

Quote:
>I am using Access97 and am writing some functions in a global module.

>What is the best way to pass a Form to one of my functions ?

>1.  Pass is ByVal
>2.  Pass is ByRef
>3.  Pass the Form Name

>Any advice is appreciated.

Hi Chris,

Forms (and all objects) can not be passed by value. So your only
choice is 2 or 3, and I would choose passing the form object. But
passing the name also works: Forms(FormNameVariable).

 -- Andy



Wed, 22 Dec 1999 03:00:00 GMT  
 ByVal / ByRef



Quote:
> What is the best way to pass a Form to one of my functions ?

Object references can only be passed by reference. No choice in this
matter. -- Ken


Wed, 22 Dec 1999 03:00:00 GMT  
 ByVal / ByRef

Thanks for the help.  It is greatly appreciated.   =)

Quote:
> > What is the best way to pass a Form to one of my functions ?

> But I see your point -- the best solution for me, at least, is to almost
> always pass a form reference (which will always be  by reference). -- Ken



Wed, 22 Dec 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Questions regarding objects, assignments, byval, byref, etc...

2. byval / byref

3. ByVal ByRef what else can I try?

4. API ByVal\ByRef

5. Override ByRef with ByVal

6. byVal vs ByRef

7. Change Standard from ByVal to ByRef

8. Event Arguments : ByRef or ByVal (Which Best)?

9. Peformance in VB.NET - ByRef and ByVal

10. objects byval and byref

11. ByRef And ByVal for Object

12. ByRef and ByVal

 

 
Powered by phpBB® Forum Software