Re: How to update a field??
You could use an Action Query like
VB Code:
UPDATE Table SET FieldName='data' WHERE FieldName='Criteria'
Re: How to update a field??
Quote:
Originally Posted by dee-u
You could use an Action Query like
VB Code:
UPDATE Table SET FieldName='data' WHERE FieldName='Criteria'
For this to be failsafe though you need a primary key in the table. Say it is a field called ID, and you have two visible text boxes, txtOne and TxtTwo for displaying/editing the fields FieldOne and FieldTwo and one other (locked and probably invisible) called txtID for displaying the ID field. You could then use:
ADOConnection.Execute("UPDATE YourTable SET FieldOne = '" & txtOne & "', FieldTwo = '" & txtTwo & "' WHERE ID = " & txtID)
This is assuming that the two editable fields are text fields and the ID is numeric (autonumber is the easiest).