I am putting data into my class variables like so
I think when I Dim the Class Variables I am deleting original information or creating a new one.
Any way I want to store a Client name from one form and and the retrieve it later from another form.
Form1 stores info.
I think I'm missing something in the Class like creating an Array or Type
Form2 retrieves it
here is my Class
DougP, MCP, A+
I think when I Dim the Class Variables I am deleting original information or creating a new one.
Any way I want to store a Client name from one form and and the retrieve it later from another form.
Form1 stores info.
I think I'm missing something in the Class like creating an Array or Type
Code:
Dim AClass As Class1
Set AClass = New Class1
AClass.Client = Me.Client ' Client contains "Mr. Smith"
Form2 retrieves it
Code:
Private Sub Form_Activate()
Dim BClass As Class1
Set BClass = New Class1
' check to see if values are populated
If Me.Client = "" Then
Me.Client = BClass.Client ' <<<< but its empty
End If
End sub
Code:
Private pClient As String ' << I thought this would store the info but not sure what's going on?
Property Let Client(S As String)
pClient = S
End Property
Property Get Client() As String
Client = pClient
End Property
DougP, MCP, A+