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

Inaccurate Scroll Bars on Subforms

Status
Not open for further replies.

CyrusAyers

Programmer
Feb 4, 2004
25
0
0
US
Is there a way to make the scrollbars on a subform display more clearly that the user is at the end of the subform and its not blank? If there is one record, for example, the scroll bar/wheel can make it dissapear, but the scroll bar wont reflect that it is up there. This could mislead the user to think that the subform is blank. --Thank you
 
The scrollbars Property is just that. It is a property of a form or a text box. They are either on or off. The scrollbar itself doesn't have any properties or events, so can't be modified or used in ANY way. Just another one of Access's limitations. You could turn the mouse-wheel off while the focus is in the subform if that's any help.
 
[tt]
Hi:

You could use the GoToRecord in a macro or VBA to go to the last record. Then you could "go" to the previous record the number of times that would fill your sub form (I assume your sub form is Continuous records). Probably have to use "While Not EOF..." to accomdate main form records with only one or a few child records.

I hope this helps.[/tt]

[glasses][tt]Gus Brunston - Access2000(DAO)
Skill level based on 1-10: 7, on the way to 6, and beyond!
Webmaster: www.rentdex.com[/tt]
 
Dont see where to disable the scroll wheel (is that 2002?) VBA would be better, could you help with this?

Dim thisOne As DAO.Recordset
Set thisOne = Me.RecordsetClone
thisOne.Bookmark = Me.Bookmark
If thisOne("LineNum") Is Not Null Then
thisOne.MoveLast
If thisOne.EOF = True Then thisOne.MoveLast
End If

Me.Bookmark = thisOne.Bookmark

--Thanks for helping :D
 
Cyrus,
What's a scroll wheel?

If you mean scroll bar then you can't turn it off for a datasheet. For continuous forms you can turn it off though.

If you mean the mouse-wheel then you'll need to download a DLL called MouseHook.DLL and install it. A bit fiddly but works very well.

About your code, I haven't a clue!
[blue]If thisOne("LineNum") Is Not Null Then[/blue]
I'm not sure about this line inparticular. Perhaps Gus can help.
Good luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top