Limit form input to current new record

S

Scott

I am tring to create a data entry form that limits the
input to one new record. Removing the navigation buttons
does not help because the mouse wheel event brings up a
new record in the form. I've been unsuccessful with code
to apply filters for the record ID, etc., but I'm not a
very sophisticated coder YET.

Is there a simple way to do this?

Thanks!
 
D

Dirk Goldgar

Scott said:
I am tring to create a data entry form that limits the
input to one new record. Removing the navigation buttons
does not help because the mouse wheel event brings up a
new record in the form. I've been unsuccessful with code
to apply filters for the record ID, etc., but I'm not a
very sophisticated coder YET.

Is there a simple way to do this?

Set the form's Data Entry property to Yes, and put code like this in the
form's AfterInsert event:

Private Sub Form_AfterInsert()

Me.AllowAdditions = False

End Sub
 
S

Scott

Thank you!! Works beautifully.

-----Original Message-----


Set the form's Data Entry property to Yes, and put code like this in the
form's AfterInsert event:

Private Sub Form_AfterInsert()

Me.AllowAdditions = False

End Sub

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


.
 
F

fredg

Scott said:
I am tring to create a data entry form that limits the
input to one new record. Removing the navigation buttons
does not help because the mouse wheel event brings up a
new record in the form. I've been unsuccessful with code
to apply filters for the record ID, etc., but I'm not a
very sophisticated coder YET.

Is there a simple way to do this?

Thanks!
Scott,
What do you wish to do after the one record has been added?
Close the Form?
Leave the form open for editing?
 

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