Y
yanguo
I have a listbox with data populated from a SQL Server 2000 database table. I
have a subform that works like editbox for the record selected on the
listbox. I am trying to make the listbox values be updated when data is
changed and the record is updated from subform. I am doing this in the
subform's afterupdate event:
Private Sub Form_AfterUpdate()
Me.Parent.lstORServiceLevelApprovals.ItemData(6, lIndex) = fieldvalue
End Sub
Here the lIndex is presaved listindex of the listbox in mainform and the
fieldvalue is value of the bonded field value on subform same as column 6 of
the listbox on mainform. When it runs to this line I got a rumtime error
"450" - Wrong number of argumens or invalid property assignment. I am sure
that the indexes are correct. So I am now suspecting if ItemData for
listboxes are editable.
Any comments? Thanks!
have a subform that works like editbox for the record selected on the
listbox. I am trying to make the listbox values be updated when data is
changed and the record is updated from subform. I am doing this in the
subform's afterupdate event:
Private Sub Form_AfterUpdate()
Me.Parent.lstORServiceLevelApprovals.ItemData(6, lIndex) = fieldvalue
End Sub
Here the lIndex is presaved listindex of the listbox in mainform and the
fieldvalue is value of the bonded field value on subform same as column 6 of
the listbox on mainform. When it runs to this line I got a rumtime error
"450" - Wrong number of argumens or invalid property assignment. I am sure
that the indexes are correct. So I am now suspecting if ItemData for
listboxes are editable.
Any comments? Thanks!