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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scrolling through records 1

Status
Not open for further replies.

gnt

Technical User
Aug 15, 2002
94
US
Hello-
Is there a way to disable the mouse wheel from scrolling through records on a form? I want my user to only be able to change records using my lookup text box.
Thanks-
 
In the Query or Recordset bound to your Form you could set the Criteria of the RecordNumber Field to equal the lookup text box on your Form:

[Forms]![YourFormName]![lookup text box].

In the After Update Event of the lookup text box use:

Me.Requery 'Update the Main Form
Me!YourSubForm.Requery 'Update Sub Form (If any)

Using something similar to the above doesn't actually disable the mouse's scroll capability, but displays just 1 record at a time so that there are no other records for the mouse to scroll through.

You might also want to set a Default Value for your lookup text box so that when the Form is first opened it is not blank.

Good Luck
 
Works beautifully!
Thanks so much-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top