mouse scroll and close

  • Thread starter Thread starter jmo
  • Start date Start date
J

jmo

I have a access database going, access 2003...first form is a login with a
user name and password, user then enters the second form a Input QC1 form
where they will be entering data into text boxes that data is then moved to a
table. Everything works ok with the data entry side the user fills out each
text box and then hits the add record command button and the data goes to the
table...but if you scroll the mouse wheel down it starts adding record or if
you close the form it will add a record and these records are blank because
nothing is in the text boxes...any ideas how to get around this?
 
I use a form current to show my user name and date in text boxes on the form
passing over from the log in form etc.

Private Sub Form_Current()
If Me.NewRecord Then
Me!User_Name = [Forms]![Login Form]![user name]
Me!time_stamp = Date
End If

End Sub

not sure if this is the issue or not...
 
jmo said:
I have a access database going, access 2003...first form is a login with a
user name and password, user then enters the second form a Input QC1 form
where they will be entering data into text boxes that data is then moved to a
table. Everything works ok with the data entry side the user fills out each
text box and then hits the add record command button and the data goes to the
table...but if you scroll the mouse wheel down it starts adding record or if
you close the form it will add a record and these records are blank because
nothing is in the text boxes.

MouseWheelHook is an MDB and DLL demonstrating how to use a MouseHook
to turn off the MouseWheel http://www.lebans.com/mousewheelonoff.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
Back
Top