mouse scroll and close

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?
 
J

jmo

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...
 
T

Tony Toews [MVP]

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/
 

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