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!

Editing Records

Status
Not open for further replies.

mans

Programmer
Mar 18, 2000
136
AU
Hello,<br><br>I am attempting to update records within a DBGrid (dao36) using VB6 and Access2000.&nbsp;&nbsp;I have a form with a grid and text/combo boxes which display the data that is within the grid.&nbsp;&nbsp;I would like to be able to issue commands to edit and update the record I highlight in the grid from within the text/combo boxes.&nbsp;&nbsp;I am using the edit-update method but it only edits the first record in the grid, no matter which record I highlight.&nbsp;&nbsp;Can somebody please let me know what I need to do to allow the editing and updating of a highlighted record within a grid from text boxes.<br><br>Thanks<br>
 
The reason for this behaviour is that even though you have moved to the correct record in the grid you have not moved to it in the data. Although I do not know DAO to well, so you might want to check what I'm saying, you have to programatically move to the recordset cursor to the correct record. This can be done using the move commands or by retrieving the Primary Key column value for the record that You want to update and using this as a where clause in you insert statement<br><br>Hope this helps <br><br><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top