nikhilkumar_99
December 21st, 1999, 02:59 PM
Scenario: I am using a DataGrid control, with an ado Data Control as the record source. The database autogenerates the primary (system generated). I set the properties of the datagrid to
dgrd.AllowAddNew = True
dgrd.AllowDelete = False
dgrd.AllowUpdate = False
What has to be done to be able to allow users to add data. What I want them to do is to click a command button and be placed on the new row of the data grid where they can add data. I want to be able to update the database only when the datagrid tries to send the update to the database. What is happening is that the cursor gets placed onto the correct line but the user can edit nothing.
However, I can let the user update (modify an existing record and update) the database. The settings in that scenario are:
dgrd.AllowAddNew = False
dgrd.AllowDelete = False
dgrd.AllowUpdate = True
I anyone knows of a snippet of code that I can look at or any such location, please give me a heads up. Its urgent.....
Thanks
n.b. I am using a VB 6.0 front end and an Acess ODBC driver.
dgrd.AllowAddNew = True
dgrd.AllowDelete = False
dgrd.AllowUpdate = False
What has to be done to be able to allow users to add data. What I want them to do is to click a command button and be placed on the new row of the data grid where they can add data. I want to be able to update the database only when the datagrid tries to send the update to the database. What is happening is that the cursor gets placed onto the correct line but the user can edit nothing.
However, I can let the user update (modify an existing record and update) the database. The settings in that scenario are:
dgrd.AllowAddNew = False
dgrd.AllowDelete = False
dgrd.AllowUpdate = True
I anyone knows of a snippet of code that I can look at or any such location, please give me a heads up. Its urgent.....
Thanks
n.b. I am using a VB 6.0 front end and an Acess ODBC driver.