Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / February 2006

Tip: Looking for answers? Try searching our database.

Limit Records in a Subform

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bironmx - 28 Feb 2006 17:55 GMT
I have a subform as a datasheet within a form. I want to limit the number of
subform records that a user can edit to three for each main form record. Any
suggestions?

Thank You for your time in advance...
strive4peace - 28 Feb 2006 18:09 GMT
on BeforeInsert event of subform

if me.recordset.recordcount >= 3 then
   msgbox "You may not add any more records",,"Cannot Add
record"
   cancel = true
   me.undo
end if

Have an awesome day

Warm Regards,
Crystal

MVP Microsoft Access
strive4peace2006 at yahoo.com

> I have a subform as a datasheet within a form. I want to limit the number of
> subform records that a user can edit to three for each main form record. Any
> suggestions?
>
> Thank You for your time in advance...
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.