Run Update Query for current record

  • Thread starter Thread starter mattc66 via AccessMonster.com
  • Start date Start date
M

mattc66 via AccessMonster.com

I have button on my form that runs an Update Query. However I want to limit
the query to only run based on the current record on the form. How would l
best handle this issue?
 
If you have some Field on the Form that can uniquely identify the Record,
you can use this as the criteria in your Update ... something like

CurrentDb.Execute "UPDATE ..... SET .... " & _
"WHERE [IDField] = " & Me.IDField, dbFailOn Error

(assuming a numeric IDField).

Is your Form updatable? If so, you may create conflicts since you update
the same record via the Form and the Update SQL.
 
Back
Top