EOF Issue

G

Guest

Greetings,

I have a form that displaysthe project managers for the various projects in
the database. The form is set to show only one record at a time, vice a list
of managers, as it also displays a subform with all the projects assigned to
that manager.

The problem I am having is that if a user deletes the last record or moves
past it either by the navigation buttons at the bottom of the form or by
tabbing, then the form automatically goes into the add a new record mode,
which I don't want. The only way a new record should be added is if the user
clicks the add record button that I have provided.

So my question is how do I prevent the add record from kicking in when the
user reaches the EOF?

--
Cheers

Klingon Coder

"Ancient Klingon Proverb - Act and you shall have dinner, Think and you
shall be dinner"
 
G

Guest

Will that still allow them to add a new record when they click on the "Add"
button?


--
Cheers

Klingon Coder

"Ancient Klingon Proverb - Act and you shall have dinner, Think and you
shall be dinner"
 
D

Dirk Goldgar

Klingon Coder said:
Will that still allow them to add a new record when they click on the
"Add" button?

In the form's AfterInsert event, execute the statement,

Me.AllowAdditions = False

In the "Add" button's Click event, before going to the new record,
execute the line,

Me.AllowAdditions = True
 
G

Guest

Karl and Dirk,

Thank you both for your assistance. Between both of your posts, I have
managed to achieve the desired results.

--
Cheers

Klingon Coder

"Ancient Klingon Proverb - Act and you shall have dinner, Think and you
shall be dinner"
 

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