How to increment a field in a table

N

ndunwoodie

What is the code for incrementing an integer field in a table by pushing a
button on a form? I'm drawing a blank. thanks in advance
 
A

Alex Dybenko

Hi,
i think easiest way is to use an update query:

currentdb.execute "Update MyTable Set MyField=MyField+1 Where ID=" & me.ID,
dbfailonerror
 
Top