View Single Post
Old 06-18-2007, 01:22 AM   #19 (permalink)
Salchester
Salchester
 
Salchester's Avatar
 
Join Date: Jul 2005
Location: In a house
Posts: 230
Salchester is an unknown quantity at this point
Insert Table Data into Array

DJMaze,

That's It? But how do I store the data in a variable in the array like following Visual Basic code does?

The name, species, & sex variables are linked with the array on the 6th line.

Code:
Private Type details
  name As String
  species As String
  sex As String
End Type
Dim record() As details

Private Sub Form_Load()
  ReDim record(0)
End Sub

Private Sub lblNext_Click()
  ReDim Preserve record(UBound(record) + 1)
  record(UBound(record)).name = txtName.Text
  record(UBound(record)).species = txtSpecies.Text
  record(UBound(record)).sex = txtSex.Text
  MsgBox record(1).name
End Sub
Many Thanks,
P.S I'm 20 Why?
__________________
Many Thanks, in advance!

Salchester.
The Future Is Here - Are You Ready?
Salchester is offline   Reply With Quote