0

Hi All,
I want to use the data grid as input interface.
Can any one help how to start.
i need 3 columns date, name, location
the location field is drop down field user can select from the list only.
the values entered by user should update in the database.


your help is most appreciated :icon_wink:

Vijay

3
Contributors
4
Replies
5
Views
10 Years
Discussion Span
Last Post by agrothe
0

I don't want to bind it with control, other than this any thing:(

Try using disconnected recordset, then apply the recordset to the database after editing.

Dim rst As New ADODB.Recordset
Dim xData(2, 1) As String
 
Private Sub Form_Load()
xData(0, 0) = "23"
xData(0, 1) = "Michael Jordan"
xData(1, 0) = "24"
xData(1, 1) = "Kobe Bryant"
xData(2, 0) = "33"
xData(2, 1) = "Grant Hill"
With rst
    .Fields.Append "idno", adInteger
    .Fields.Append "names", adVarChar, 30
    .CursorType = adOpenKeyset
    .Open
    For Index = 0 To UBound(xData)
        .AddNew
        .Fields("idno") = CInt(xData(Index, 0))
        .Fields("names") = xData(Index, 1)
        .Update
    Next
End With
Set DataGrid1.DataSource = rst
End Sub
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.