Stop advancing in form with the "next" arrow at end of "list"

I have an editable form for users where they can query by date, etc.  
However, the next entry arrow allows them to advance beyond the result.  For 
example, if their query resulted in 1 of 4, they can still click to 5, 6, and 
so on which only adds blank lines to the database table.  How do I set this 
to stop at the last entry of their original query?
0
Utf
3/3/2010 7:24:01 PM
access.forms 6864 articles. 2 followers. Follow

3 Replies
941 Views

Similar Articles

[PageSpeed] 16

You can cancel adding new records like this:

Private Sub Form_BeforeInsert(Cancel As Integer)
    Cancel = True
End Sub


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"Duchess" <Duchess@discussions.microsoft.com> wrote in message 
news:45F0B103-E687-4A47-9A51-B082686C972F@microsoft.com...
>I have an editable form for users where they can query by date, etc.
> However, the next entry arrow allows them to advance beyond the result. 
> For
> example, if their query resulted in 1 of 4, they can still click to 5, 6, 
> and
> so on which only adds blank lines to the database table.  How do I set 
> this
> to stop at the last entry of their original query? 


0
Jeanette
3/3/2010 8:01:45 PM
On Wed, 3 Mar 2010 11:24:01 -0800, Duchess <Duchess@discussions.microsoft.com>
wrote:

>I have an editable form for users where they can query by date, etc.  
>However, the next entry arrow allows them to advance beyond the result.  For 
>example, if their query resulted in 1 of 4, they can still click to 5, 6, and 
>so on which only adds blank lines to the database table.  How do I set this 
>to stop at the last entry of their original query?

Set the AllowAdditions property of the form to No.

You may also want to have at least one field in the table Required, to prevent
the addition of blank records.
-- 

             John W. Vinson [MVP]
0
John
3/3/2010 9:22:48 PM
In addition to John's suggestion of making at least one field required, 
setting AllowAdditions to No, can ause problems if there are no records 
matching the search.
The details section can go completely blank. You can cancel the before 
insert event and still leave AllowAdditions set to Yes.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"John W. Vinson" <jvinson@STOP_SPAM.WysardOfInfo.com> wrote in message 
news:pnkto5hr0vr5sv763fdop5fic0bgqdtb3f@4ax.com...
> On Wed, 3 Mar 2010 11:24:01 -0800, Duchess 
> <Duchess@discussions.microsoft.com>
> wrote:
>
>>I have an editable form for users where they can query by date, etc.
>>However, the next entry arrow allows them to advance beyond the result. 
>>For
>>example, if their query resulted in 1 of 4, they can still click to 5, 6, 
>>and
>>so on which only adds blank lines to the database table.  How do I set 
>>this
>>to stop at the last entry of their original query?
>
> Set the AllowAdditions property of the form to No.
>
> You may also want to have at least one field in the table Required, to 
> prevent
> the addition of blank records.
> -- 
>
>             John W. Vinson [MVP] 


0
Jeanette
3/4/2010 1:27:16 AM
Reply:

Similar Artilces: