Increment

  • Thread starter Thread starter mushy_peas
  • Start date Start date
M

mushy_peas

Hiya folks.
i noob at acess so dont be too mean.

Trying to produce a form and got a few problems.

Main one is theres a "log number" which every time a new record i
started auto increments by 1 from the previous.

Cheer
 
You could use an AutoNumber field.

If you want to code it yourself, use the Before Update event procedure of
the form to lookup the maximum value so far in the table, and add 1:

Me![log number] = Nz(DMax("log number", "MyTable"), 0) + 1

Note that this is not 100% safe in a multi-user environment where more than
one person may be adding records at the same time.
 
Back
Top