Limit form input to current new record

  • Thread starter Thread starter Scott
  • Start date Start date
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!
 
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
 
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)


.
 
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?
 
Back
Top