Limited the number of records displayed in a datasheet

R

Rob P

Hi...

I am assigning 32 IP Addresses from a subnet to a particular ID. I have a
query to report unassigned IP addresses but want to limit the number of
records displayed in a subform (datasheet view) to 32 and no 65000+.


Is this possible???

Thanks
 
A

Arvin Meyer [MVP]

Sure, something like this should work:

Sub Form_BeforeInsert ( Cancel as Integer )
If Me!MySubForm.Form.RecordSetClone.RecordCount = 32 then
Msgbox "Only 32 records are allowed"
Cancel = True
Exit Sub
End If
End Sub
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 

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