Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set a Maximum figure of records to be entered.

Status
Not open for further replies.

mpsDA

IS-IT--Management
Jul 27, 2005
43
GB
How can you set a maximum number of records to be entered. i just want to enter only 20 Records.
 
In the BeforeInsert event procedure of the data entry form:
If DCount("*", "[name of underlaying table]") >= 20 Then
MsgBox "Only 20 records allowed"
Cancel = True
End If

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top