on 08-24-2011 6:01 AM
dear all
can you tell me what wrong in following code. when it is going on loop aaded one extra coloum in the matrix with blank value..
If topvalue > 0 Then
oMatrix.Clear()
With oSubForm.DataSources.DBDataSources.Item("@TINSP3")
oMatrix = oSubForm.Items.Item("1000001").Specific
Dim x As Integer
For x = 1 To topvalue
oMatrix.AddRow()
'Dim str As String = oEditText.Value
.InsertRecord(.Size)
'.SetValue("U_SAMPLENO", .Size - 1, x)
.SetValue("U_SAMPLENO", .Size - 1, x)
Next
oMatrix.LoadFromDataSource()
End With
End If
Hi
Try this code
If topvalue > 0 Then
oMatrix = oSubForm.Items.Item("1000001").Specific
With oSubForm.DataSources.DBDataSources.Item("@TINSP3")
.Clear()
oMatrix.FlushToDataSource()
Dim x As Integer
For x = 1 To topvalue
.InsertRecord(.Size)
.SetValue("U_SAMPLENO", .Size - 1, x)
Next
oMatrix.LoadFromDataSource()
End With
End If
Regards
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.