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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change value in DBGrid

Status
Not open for further replies.

MLNorton

Programmer
Joined
Nov 15, 2009
Messages
134
Location
US
I need to change the value in a field in a DBGRid.
I use the following code:

Form_LettersDisplay.ADOTable1.edit;
Form_LettersDisplay.ADOTable1.FieldByName('MemLetter').AsString := 'Sent';
Form_LettersDisplay.ADOTable1.post;

This works but on the first record in the dataset, not the record I selected.

How can I solve this problem?
 
That should work. Is there a primary key for your table?
 
Yes, I have a Primary Key in the Table.
 
Do you have any event code associated with your ADOTable1?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top