Hi,
I have created a dynamic form with an Update button. I have declared the following global variable:
and later in a loop the following
And Finally
My Problem is:
The code generates the correct layout and the correct controls, but only the last Update button generated works. What am I doing wrong?
Any help would be greatly appreciated.
I have created a dynamic form with an Update button. I have declared the following global variable:
VB.NET:
WithEvents btnUpdate As Button
VB.NET:
btnUpdate = New button
...
Me.Controls.Add(btnUpdate)
VB.NET:
Private Sub btnUpdate_Click(sender As Object, e As EventArgs) Handles btnUpdate.Click
UpdateForm.tbRef.Text = Me.tbRef.Text
UpdateForm.Show()
End Sub
[FONT=Consolas][SIZE=2][COLOR=#dcdcdc][FONT=Consolas][SIZE=2][COLOR=#dcdcdc][FONT=Consolas][SIZE=2][COLOR=#dcdcdc]
[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT]
My Problem is:
The code generates the correct layout and the correct controls, but only the last Update button generated works. What am I doing wrong?
Any help would be greatly appreciated.