|
-
Feb 11th, 2000, 06:48 PM
#1
Thread Starter
New Member
-
Feb 12th, 2000, 02:00 AM
#2
Member
I didn't see the old problem, so I'm stabbing in the dark here.
My question is: Have you set the Max and Min properties, with min=0 and max=NumberOfRecords?
With SmallChange=1, it should at least step properly.
--Carl
-
Feb 12th, 2000, 07:18 AM
#3
Thread Starter
New Member
-
Feb 12th, 2000, 01:34 PM
#4
Well, you were a bit fague here and didn't post any code. What type of Data Objects are you using?
If what you're trying to achieve is Navigating a Recordset via a Scrollbar, try this:
Code:
Private oDB As Database
Private oRS As Recordset
Private Sub Form_Load()
Set oDB = OpenDatabase("BIBLIO.MDB")
Set oRS = oDB.OpenRecordset("Authors", dbOpenTable)
HScroll1.Max = oRS.RecordCount
HScroll1.Min = 1
HScroll1.LargeChange = HScroll1.Max / 100
HScroll1.SmallChange = 1
HScroll1_Change
End Sub
Private Sub Form_Unload(Cancel As Integer)
oRS.Close
oDB.Close
Set oRS = Nothing
Set oDB = Nothing
End Sub
Private Sub HScroll1_Change()
Static lLastVal As Long
If lLastVal = 0 Then lLastVal = 1
If (HScroll1 - lLastVal) <> 0 Then
oRS.Move (HScroll1 - lLastVal)
lLastVal = HScroll1
End If
Text1 = oRS("Author")
Caption = HScroll1
End Sub
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
Certified AllExperts Expert
-
Feb 12th, 2000, 03:57 PM
#5
Thread Starter
New Member
THANKS HEAPS,
Your code did the trick, I just adjusted it slightly.
THANKS AGAIN 
------------------
Tommy Boy.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|