Access Access Counter when adding data /records

Joined
May 31, 2012
Messages
6
Reaction score
0
Hi all, please help. I have a counter which is working when making bookings however i want it to count per "ClientID" , it must pop a message and still continue taking other bookings, for other people. e.g. If I make a booking for John Doe, the booking will run till the third booking and only pop a message saying "maximum bookings made". Same must happen with other users. In other words it counts per user id not by overall bookings.If Peter made 1 and John made 2 bookings - the message must not pop up although 1 + 2 = 3. The message must only pop up for Peter once he reaches 3 and for John on his 3rd booking as well. I hope you will help me here. Again thanks for your help.See attached screenshots
Here is my current code - where do i stick the client id,appointment table, etc
Private Sub Form_BeforeUpdate(Cancel As Integer)
If RecordsetClone.RecordCount = 2 Then
MsgBox "Maximum bookings made."
End If
End Sub
Private Sub Form_Current()
If RecordsetClone.RecordCount = 2 Then
Me.AllowAdditions = True
Me.AllowEdits = False
End If
End Sub
 

Attachments

  • ClientTable.JPG
    ClientTable.JPG
    5.3 KB · Views: 167
  • AppointmentTable.JPG
    AppointmentTable.JPG
    11.4 KB · Views: 147
  • counterperclient.JPG
    counterperclient.JPG
    17.9 KB · Views: 203
Joined
May 31, 2012
Messages
6
Reaction score
0
please help - i attached the db for easier referal
 

Attachments

  • bpcs.zip
    210.4 KB · Views: 103

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top