aharris2693
Programmer
I am looping through an Access database and for each record, creating a text box to display 1 field from each record. The problem is that the field is a memo and therefor some records are quite long. I have tried to set the multiline property to true, but I get errors everytime I use this property. My code is below. Thanks in advance for any help.
Do Until dbRS.EOF
ReDim txtName(i)
If i = 1 Then
Set txtName(i) = Me.Controls.Add("vb.textbox", "txtBox", Me)
txtName(i).Visible = True
txtName(i).Left = 120
txtName(i).Top = commentLeft
txtName(i).Height = 975
txtName(i).Width = 4095
txtName(i).Enabled = True
txtName(i).Locked = False
txtName(i).MultiLine = True 'error caused here
txtName(i).Text = dbRS("Comment"
End If
dbRS.movenext
Loop
Do Until dbRS.EOF
ReDim txtName(i)
If i = 1 Then
Set txtName(i) = Me.Controls.Add("vb.textbox", "txtBox", Me)
txtName(i).Visible = True
txtName(i).Left = 120
txtName(i).Top = commentLeft
txtName(i).Height = 975
txtName(i).Width = 4095
txtName(i).Enabled = True
txtName(i).Locked = False
txtName(i).MultiLine = True 'error caused here
txtName(i).Text = dbRS("Comment"
End If
dbRS.movenext
Loop