Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP!! How to Cancel "Add New "in a datagrid

Status
Not open for further replies.

kiwiCoder

Technical User
Aug 2, 2001
45
NZ
I have an Adodc control connected to an Access 2000 db. There is an array of txtboxes and a datagrid connected to the Adodc, the datagrid is only for viewing the recoeds and accepts no user input. Adding or editing records is done via the txtboxes. My problem is that after setting Adodc to add new, if I enter data into a textbox,then delete that string, I am unable to cancel the Add New, there is a Dategrid error saying, whichever field I entered cannot be blank. This does not occur if the user calls Add New and then presses Cancel without entering anything.

Any ideas for a lowly student???
 
I'm not sure what you're doing, but instead of using the adodc control to add data, I think you should do it by code.
Using ADO and the Connection.Execute method to insert records on your table.

This should be the "better" way of doing it.

Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top