If box=true then pick the next number

Sniper-BoOyA-

Registered User.
Local time
Today, 12:36
Joined
Jun 15, 2010
Messages
204
Good Afternoon,

I have got this form (see attachment for screenshot).

The idea is,

Theres a list of samples, and the user can select the ones needed to start a test.

The user also gets to choose which ProctorID she would like to give the test (right now). But i want to automate that process to prevent duplicate ProctorID's which may cause problems in the end.

Is it possible to add a AfterUpdate-event to the selectionbox, that If Box = True, then it should check which ProctorID number(s) has been used, and then last ProctorID number used + 1 ??

Or is it not as simple as i think it is?
 

Attachments

  • Form.JPG
    Form.JPG
    79.1 KB · Views: 108
will do .. thanks !
 
yay it worked


Code:
Private Sub prctr_AfterUpdate()
If prctr = True Then
proctor = DMax("proctorid", "tblProctor") + 1
End If
End Sub

Cheers m8!
 
Woopee!!

Glad you got it working.

There's much debate about this and most people will say it's much better to use a recordset to get the ID using a property called LastModified. It may be an issue if you have lots of people using the db and if that table is manipulated by several users at the same time.
 
Woopee!!

Glad you got it working.

There's much debate about this and most people will say it's much better to use a recordset to get the ID using a property called LastModified. It may be an issue if you have lots of people using the db and if that table is manipulated by several users at the same time.

Right on. That wont be a problem due to the fact that the database will be used by just one person, in the worst case 2. Anyways, thanks again!
 

Users who are viewing this thread

Back
Top Bottom