G
Gerry Verschuuren
What I tried to do is declaring a Public Type in a standard module in Access
2007: Public Type Employee
Name As String
DOH As Date
End Type.
Then I declared in the same module: Public colEmpls As New Collection.
Finally I created in the same module a Sub like this:
Public Sub(var1 As String,var2 As Date)
Dim utdEmpl As Employee
utdEmpl.Name = var1
utdEmpl.DOH = var2
colEmpls.Add utdEmpl
The code gets stuck on the last line. I know I could add utdEmpl.Name to the
Collection instead, but why can I not add utdEmpl itself? What should I
change to add the entire type itself to the collection (including its
members)?
Thanks for your help. Gerry
2007: Public Type Employee
Name As String
DOH As Date
End Type.
Then I declared in the same module: Public colEmpls As New Collection.
Finally I created in the same module a Sub like this:
Public Sub(var1 As String,var2 As Date)
Dim utdEmpl As Employee
utdEmpl.Name = var1
utdEmpl.DOH = var2
colEmpls.Add utdEmpl
The code gets stuck on the last line. I know I could add utdEmpl.Name to the
Collection instead, but why can I not add utdEmpl itself? What should I
change to add the entire type itself to the collection (including its
members)?
Thanks for your help. Gerry