I have went out an got a dynaset from an Oracle database. I then do a loop where I add
the two fields (Username, Created) to my listbox. Everything works fine except that I
have a Horizontal scroll bar and it does PAGE DOWN like a vetical. Is there a way to
make it be a VERTICAL scroll bar AND act like a VERTICAL bar.
' Build Existing Users List query
SQLStmt = "Select all_users.username, all_users.created "
SQLStmt = SQLStmt & "From sys.all_users "
SQLStmt = SQLStmt & "Order by all_users.username"
'Create the dynaset for the user data and test for any records
Set ds1 = gCurrentDB.CreateDynaset(SQLStmt, DB_SQLPASSTHROUGH)
'Process dynaset records
ds1.MoveFirst
If ds1.EOF Then
msg = MsgBox("No records found.", 0, "")
Screen.MousePointer = 0
ds1.Close
gCurrentDB.Close
Exit Sub
Else
ds1.MoveLast
numrecs = ds1.RecordCount
End If
i = 1
lstExistingUsers.Clear
ds1.MoveFirst
Do While Not ds1.EOF
If Not IsNull(ds1.Fields("Username")) Then
lstExistingUsers.AddItem ds1("Username") & " " & ds1("Created")
Else
lstExistingUsers.AddItem "Unknown username"
End If
ds1.MoveNext ' Get the next record
If ds1.EOF Then ' Are we at the last record?
Screen.MousePointer = 0
Exit Sub
End If
i = i + 1
Loop