Addings a counter (autonumber)

rw0706

Registered User.
Local time
Today, 13:39
Joined
Mar 25, 2009
Messages
10
Hi, I was wondering if there was a way to set up a counter using VBA?

In the subform I have set up, in datasheet mode, a user will take 6 measurements (4 fields in a measurement), in the same order. I would like to be able to attatch a number from 1 to 6 to each of these measurements. When the record is added in the main form I would like the counter to reset back to 1 (on current).

It sounds pretty simple but I'm not really sure where to get started.

Thanks
 
counters are easy. here is an example:
Code:
dim counter as integer, c as control

counter = 1

for each c in me.controls
   [COLOR="DarkGreen"]'do something with the control[/COLOR]
      debug.print counter [COLOR="darkgreen"]'which control number am I on!?[/COLOR]
         counter = counter + 1
next c
 

Users who are viewing this thread

Back
Top Bottom