Limiting Records

mohammadagul

PrinceAtif
Local time
Tomorrow, 00:38
Joined
Mar 14, 2004
Messages
298
How can i limit The dataentyr to limited records. forexample in my form invoice i want to limite the invoiceno to 100. when it reaches 100 it should give message
such as

"Your Data Entry Limit is Over"

Any Ideas.
 
I would use the DCount() function to test how many records are in the table.

Code:
If DCount("*", "YourTableNameHere") > 100 Then
    MsgBox "> 100 records."
Else
    MsgBox "< 100 records"
End If
 
Form_Current
If Me.RecordsetClone.RecordCount>100 Then
Me.AllowAdditions=False
MsgBox"End Of Limit"
End If
 
Very new to coding...where exactly would you add this code?
 

Users who are viewing this thread

Back
Top Bottom