Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Re: Holding and passing Values


Message #1 by "Joe Conaty" <joec@s...> on Thu, 13 Jun 2002 10:16:44 -0700
This is a multi-part message in MIME format.

------_=_NextPart_001_01C21221.2EB8E182
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

You are not setting Value in GetPushPins.

-----Original Message-----
From: Joe Conaty [mailto:joec@s...]
Sent: Wednesday, June 12, 2002 10:16 AM
To: professional vb
Subject: [pro_vb] Holding and passing Values

I am trying to pass a value to a sub here is my code

1st. I need to check to see if the app is running before I can pass the
true / false

Private Sub mnuShwPP_Click()
   Dim Value As New clsValue
  
    GetPushpins
   
    If Value.isOpen =3D False Then
        CheckForRev
    End If
   
End Sub

2nd. I do the check by going to another sub in a module

Sub GetPushpins()
    Dim Value As clsValue
    Dim appAccess As Access.Application
    Const ERR_APP_NOTRUNNING As Long =3D 429
    On Error Resume Next
    Set appAccess =3D GetObject(, "access.Application")
    ' If Access isn't running, create a new instance.
    If Err =3D ERR_APP_NOTRUNNING Then

            Debug.Print "Opener up!"
            'DisplayPushpinsUpdate
           Value.isOpen =3D False         ' This is where I pass the 
value
    Else
            frmAppOpen.Show
            Debug.Print "Aint Happenen!"
            Value.isOpen =3D True         ' Or here depending on the
outcome
       
    End If
End Sub

3rd.  Here is the class module code

Option Explicit
Private bOpen As Boolean


Public Property Let isOpen(ByVal Value As Boolean)
    bOpen =3D Value
End Property

Public Property Get isOpen() As Boolean
isOpen =3D bOpen
End Property


Seams easy enough.  What am I doing wrong?

Many thanks as always

Joe Conaty
Nations Direct IS Dept
(xxx) xxx-xxxx  Ext 221
	
--- Change your mail options at http://p2p.wrox.com/manager.asp or to
unsubscribe send a blank email to 


  Return to Index