Damn You Mouse Wheel

clive2002

Registered User.
Local time
Today, 07:38
Joined
Apr 21, 2002
Messages
91
I'm haveing problems with a form.

I wont the user to go to a new record and only be allowed to enter details for this new record. However the mouse wheel is allowing me to move to the next record as are the arrow keys.

i need additions enabled so a new record is setup, I've tried setting the Cycle and tab options and setting the autonumber to locked and just about everything else.

Is their some way to stop a form moving from the current record once the autonumber has been assigned.
 
Not that it solves the mouse wheel problem (search the archives for ways to disable that), but you could set your form to come up with Data Mode set to Add. Check the Help file on OpenForm to see how to do this.
 
David R, I have done a search for this exact same subject but never found a solution that worked in my case. Do you have an example of one that does in mind?

Doesn't the Mode set to Add still allow the record to advance forward with the mouse wheel? I think Access always assumes a new record will be needed so it allows the addition of one by moving forward even while working on the current record.
 
MORE PROBLEMS
+++++++++++++++

OK, I've set the cycle and got rid of all nav buttons, I was trying to implement the VB code to disable the mouse but i got a bit confused with it.

Anyway I've know also noticed that the PageUP and PageDown buttons will also have the same effect, God damn it!

Is there another way to approach this, i'm thinking as each record has an unique Autonumber can i not set some kind of filter as soon as a number has been assigned, so the form wont let you move off the current record.

There must be something to lock a record in a form???
 
According to the knowledge base, you can disable these keys at the form level:
Code:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
   Select Case KeyCode
      Case 33, 34
         KeyCode = 0
   End Select
End Sub

Make sure you turn on Key Preview for the form in order for this to work.
 

Users who are viewing this thread

Back
Top Bottom