Next Record

S

sturner333

Newbie Question:
What is the event that takes place(so I can do some VBA code) when you click
the arrow on the form to go to the next record?
Thanks
 
R

Rick B

You can use the button wizard to add a button that takes the user to the
next record. You can then take a look at the code it creates. (If you want
to find the answer yourself, or similar ones in the future.)

To answer your question, it is...

DoCmd.GoToRecord , , acNext
 
R

Rick B

Sorry, you were asking about the event, not how to do it. I think the other
post answers your question. You are most likely looking for the "Current"
event if you want something to fire as you move from one record to another
(whether forward or backward, or using a search of some kind to jump right
to a record).
 
K

Klatuu

LOL I puzzled at your first post, Rick.
I, of course, have never misread a post and responded with a meaningless
answer:)

The Current event was also my first thought, but then it really does depend
on what he wants to do. It could be the Before Update, the After Update, or
the Current.

Two of my favorite events are Before Nap and After Nap. Unlike most similar
events, the Before Nap cannot be canceled but the After Nap can.

The After Nap event can be recursive if you set the Timer event.
 
S

sturner333

I am still having trouble with this. When each new record is diplayed on the
from, I want to look to see if a check box is checked. If it is, I want to
lock the check box so as to not be changed, until the next record
re-eveluates the check box.
Thanks ofr the help.
 
K

Ken Sheridan

The appropriate event would be the form's Current event. As a bound check
box's value is a Boolean True or False you can set its locked property with a
single line in the form's Current event procedure:

Me.YourCheckBox.Locked = Me.YourCheckBox

Ken Sheridan
Stafford, England
 
K

Klatuu

Then the Current event of the form is the correct place to do this. It would
be something like:
Me.MyCheckbox.Locked = Me.MyCheckbox

This will cause the check box to lokc if it is checked and Unlock if it is
not.
 
Top