Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question regarding a Next Record navigation button on a form

Status
Not open for further replies.

Paul7905

MIS
Jun 29, 2000
205
US
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
 
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


 
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
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top