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 / December 2007

Tip: Looking for answers? Try searching our database.

No New Records

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sturner333 - 17 Dec 2007 20:57 GMT
I have a form that is populated witha query. I would like to not allow the
form to keep forwarding to new blank records. For example there are 12
records, when you use the record controls and get to record 12, you are not
allowed to go to 13, or at least not 14.
Thanks for the help.
sturner333 - 17 Dec 2007 21:12 GMT
Also, the Allow No New Record property doesn't help me. I would like to allow
a new record under certain conditions. I could do it in VBA if there is a
way. Thanks

> I have a form that is populated witha query. I would like to not allow the
> form to keep forwarding to new blank records. For example there are 12
> records, when you use the record controls and get to record 12, you are not
> allowed to go to 13, or at least not 14.
> Thanks for the help.
John W. Vinson - 18 Dec 2007 00:15 GMT
>Also, the Allow No New Record property doesn't help me. I would like to allow
>a new record under certain conditions. I could do it in VBA if there is a
[quoted text clipped - 5 lines]
>> allowed to go to 13, or at least not 14.
>> Thanks for the help.

You'll need to put code in the Form's BeforeInsert event:

Private Sub Form_BeforeInsert(Cancel as Integer)
If <conditions> Then
   MsgBox "Only 12 records please!", vbOKOnly
   Cancel = True
End If
End Sub

where <conditions> is an expression that is true if the user has hit the limit
of allowed records.

            John W. Vinson [MVP]
 
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.