If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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? |
#2
|
|||
|
|||
Stop advancing in form with the "next" arrow at end of "list"
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" wrote in message ... 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? |
#3
|
|||
|
|||
Stop advancing in form with the "next" arrow at end of "list"
On Wed, 3 Mar 2010 11:24:01 -0800, Duchess
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] |
#4
|
|||
|
|||
Stop advancing in form with the "next" arrow at end of "list"
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" wrote in message news On Wed, 3 Mar 2010 11:24:01 -0800, Duchess 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] |
Thread Tools | |
Display Modes | |
|
|