×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Question regarding a Next Record navigation button on a form

Question regarding a Next Record navigation button on a form

Question regarding a Next Record navigation button on a form

(OP)
Have a form which displays one record at a time on a form.  I have control buttons on the form which allow the user to go to navigate to the next and previous records as well as a search button but the user would like to be able to "scroll" through the records as well.

It occurred to me that I might be able to accomplish this by putting dowhile loop code in the On Mouse Down event for the "next" and "previous" record control buttons that would loop through the gotorecord command until the user released the mouse button.  

I have tried several things attempting to ascertain the status of the mouse button and everything fails (I don't seem to be able to tell whether the mouse button on the control is depressed or not. (i even turned on the auto repeat property to "yes" and this did not work either)     

I figured if I put a loop in the OnMouseDown event and then could determine when the OnMouseUp event was triggered I could accomplish this :
 
Do While Me.NextRecord.OnMouseUp = False
 DoCmd.GoToRecord , , acNext
 Do Events
Loop   

Does anyone have any suggestions as to how I might get something like this to work?

Thanks
Paul

RE: Question regarding a Next Record navigation button on a form

Could you use a slider control?  I don't know if you have rights to it.  Check the button for other controls on your toolbox in form design and see if you have it.

Kathryn
 
 
 

RE: Question regarding a Next Record navigation button on a form

(OP)
Kathryn, I do have a slider control in my activeX list ~  i placed it on my form but it did not do anything when i slide it back and forth (well it displays a numeric value is all)~  The help for the parameters on this control don't pop up anything.   I did purchase the developers tool CD and installed it but have not pursued learning how to utilize any of the features it provides yet (still learning the fundamentels of access).

How do i get this slider to work ?   (geeze, isn't there a way to check the state of the mouse buttons in vba code in a function?...........  seems a loop that would just keep getting the next or previous record as long as the button on the form was depressed would work beautifully for what i am trying to accomplish)

Paul

RE: Question regarding a Next Record navigation button on a form

Paul, dumb question maybe. Open the form in design view. Can't you go to the properties of the form and tell the default view to be continuous forms?


techsupportgirl@home.com
Brainbench MVP for Microsoft Word
http://www.brainbench.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close