Link to home
Start Free TrialLog in
Avatar of busbeead
busbeead

asked on

Run code when user clicks next record button on navigation button menu at bottom of form.

I have a form with the navigation buttons enabled. When the user clicks the "Next record button" I would like to run code.  How can I do that?

Avatar of dmitryz6
dmitryz6

On current form event put your code
Private Sub Form_Current()
 Your code
End Sub
Or you can make custom navigation buttons,using MS Access wizard and add your code there
Avatar of busbeead

ASKER

I thought OnCurrent Checked what was there.  I need to make sure that the inputs that the user places into the form are appropriate before going to the next record.  Wouldn't OnCurrent check the next record as it shows up?
Avatar of Leigh Purvis
Or better yet - don't give them *any* navigation buttons!!
;-)
For this case Use before update Event .Or create custom navigation button and check it there as well
ASKER CERTIFIED SOLUTION
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you're going to do that then this is worth looking at
http://www.lebans.com/mousewheelonoff.htm

Otherwise your lovely navigation buttons can be for nothing... weeeeeee through they go.

All the more reason to give them no navigation options :-D
Well well well.
Miriam.
Get you.
Congratulations on your new Wizard status!

Remember in your early days of answering questions - you felt reassured that I (as the 'mighty' Wizard I then was) had given the same answer?
Do you feel mighty yet?
:-)

Excellent - well deserved!
Darn mouse wheel!  It would be nice to see a mouse wheel disable as a start-up option.

Thanks, Leigh!

Now maybe I can conjure up some real talent so that I don't have to rely on luck :-)
>Do you feel mighty yet?
Still mighty reassured when I come up with the same good ideas as you!
<O.T.>

Miriam.

Congratulation good achievement.
Thanks again, Dmitry!
Hi Busbead,

I think a split  would have been appropriate here...  My comment was intended to back up and provide additional details to Dmitry's original suggestion, and as Leigh pointed out, the value of custom navigation buttons is lost if you don't disable mouse wheel scrolling.

Miriam .

Don’t worry about it.
I am glad we helped.
Your answer was just more understandable.

Regards
  Dmitry


And all I did was throw a spanner in the works :-)
Or was it a Sabo :-S
I owe you guys one (or two or three ... :-)