Access form ListBox Vertical ScrollBar

I have a listbox on a form which has over a 1000 names listed on it.
When I drag the vertical scrollbar down I would like to see the data move with it.

Can an expert suggest how to do this please.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rey Obrero (Capricorn1)Commented:
that is weird.. i got a listbox with more than that and the list shows as  you drag the v scrollbar..

can you try creating a new form, place a listbox and use the same rowsource. see if it will behave the same
PeterWhittsAuthor Commented:
Same result.  I am using the the way ...the record count  should have read 10,000 not 1000 and the list is showing unique records

SELECT DISTINCT tblCustomers.Company FROM tblCustomers WHERE (((tblCustomers.Company) Is Not Null)) ORDER BY tblCustomers.Company;

Using PageDown gets a move on but the scroll bar has very little affect....does it have a scale I can change
Rey Obrero (Capricorn1)Commented:
the only scale i could think of is the Grid X and Grid Y property of the form...

here is work around to limit the amount of records to display

Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

Rey Obrero (Capricorn1)Commented:
oops sorry, that is for a combo box not a listbox..
Rey Obrero (Capricorn1)Commented:
do you want a listbox that narrows the selection when you type characters in an unbound Textbox?, like the one in address book of outlook.
PeterWhittsAuthor Commented:
that would be useful...yes please
Rey Obrero (Capricorn1)Commented:
create an unbound Textbox, txtCompanySearch

place this codes in the change event of the textbox

private sub txtCompanySearch_change()
dim db as dao.database, rs as dao.recordset, sql as string
sql="select distinct Company FROM tblCustomers where company like '" & me.txtCompanysearch.text & "*'"

set rs=db.openrecordset(sql,dbopensnapshot)
if rs.recordcount>0 then
  me.listboxName=rs!company   '< change listboxname to actual name
end if
end sub

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PeterWhittsAuthor Commented:
Thanks for that.

I get a rte 91 "Object variable with Block variable not set"  against

Set rs = db.OpenRecordset(sql, dbOpenSnapshot)

Rey Obrero (Capricorn1)Commented:

set db=currentdb
Set rs = db.OpenRecordset(sql, dbOpenSnapshot)
PeterWhittsAuthor Commented:
unfortunately the list isnt changing although the code seems to work carrying the variable through ok on a break point and F8
Rey Obrero (Capricorn1)Commented:
can you upload a copy of your db?
PeterWhittsAuthor Commented:
unable as too much confidential stuff
PeterWhittsAuthor Commented:
can you present a small working example?
Rey Obrero (Capricorn1)Commented:
PeterWhittsAuthor Commented:
Fine now....took a screen dump of your settings and compared them to mine...must have changed some in trying to get it to work...but now ok.

If it is not too much bother, is there a way of getting the focused record in the middle of the listbox as it is always at the bottom.

Many thanks for your help so far.
PeterWhittsAuthor Commented:
I will add the extra question as a new question..many thanks for your help
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.