limiting number of times users can add the same account per day

iamratman

Registered User.
Local time
Today, 11:07
Joined
Feb 22, 2006
Messages
22
During a promotion we are running the customers are only allowed 3 entries into the system per day but the users are occasionally putting some customers in more than that. I could use some kind of function that limits the number of times the account number can be put in on a given date. (Or daily)

I have the following text boxes: ID, Customer first name, customer last name, account number, date, time.

Any ideas please?
 
Howdy, MStef

Ok I worked with that for the past few days and finaly got it going. Thank you very much for that demo db.

I needed to have the account number stay the same withthe ID on auto number and invisible. So I changed it to this: (For any one interested).

Private Sub Form_BeforeUpdate(Cancel As Integer)
If NewRecord Then
If DCount("Acctnum", "tourn_tab", "Acctnum=" & Forms!tourn_fm!ACCTNUM & " And Date = #" & Format(Forms!tourn_fm!DATE, "mm-dd-yyyy") & "#") = 3 Then
MsgBox "This account has been added 3 times today!", , "Daily Limit Reached!"
Cancel = True
Me.Undo
End If
End If
End Sub
 
Last edited:

Users who are viewing this thread

Back
Top Bottom