0

What I have is a table that stores information under an ID and a visit number. I want to automatically calculate the visit number the next time a visit record is added. To do this I need to be able to go into the table look under the ID for the last visit number, add one and make this the new visit number.

Does anyone know how to do this? I don't know how to get the data from the table and be able to use it how I want.

I was thinking maybe of using FindRecord? But that could be completely wrong.

Thank you!

EDIT--

I see on another thread the possibility of using DMax... can you use this while looking under an ID for a different value?

Gord Thompson
  • 116,920
  • 32
  • 215
  • 418
VT555
  • 91
  • 1
  • 4
  • 14

1 Answers1

0

In Access 2010 and later you can accomplish that by using an event-driven "Before Change" Data Macro like this:

enter image description here

For more information see

Create a data macro

Gord Thompson
  • 116,920
  • 32
  • 215
  • 418