Drop Down Select Conrol Box

mdg

Registered User.
Local time
Yesterday, 17:15
Joined
Feb 17, 2011
Messages
68
I was wondering if anyone had a quick fix. Not a huge problem but is annoying. I have a fairly large table with approx 15k records. I have a form where I have a drop down/select control box that displays all of these records showing a few of the fields. I select one of these records to create a new record as it places one of the fields into the new record. The problem is that there are so many records that it takes a lot of scrolling to get through all the records. Once I scroll through all the records, the next time I scroll, it is very fast and shows all the records in one scrolling. However, when I get off the form and then go back it starts over with all the records having to scroll through etc.. I hope this makes sense. What I want to be able to do is have all these records loaded so that they can be scrolled through quckily the first time I open up the form.
 
Try doing a requery on the dropdown control. You can place the following code in the Open event of the form.

i.e. docmd.[yourcontrolnamehere].Requery

HTH
Tim
 
Thank you for the suggestion. I tried that and get an error "Invalid outside procedure error'. The error box reads:
'This error occurs when an event has failed to run because Microsoft Office Access cannot evaluate the location of the logic for the event. For example, if the OnOpen property of a form is set to =[Field], this error occurs because Access expects a macro or event name to run when the event is fired.'
Your suggestion makes sense, not sure why it doesn't work. I'll keep plugging away. It is not a major problem but I know the data entry people will not like having to scroll so much to find a name etc.. Is there a search function that you can type in the first couple of letters that will then take you to that area of records similar to when you search for a record to display by using the search feature.?..
thanks again.
 
Check to see if you have a rogue "End sub" within your code. I've gotten this error on occasion and its because I've accidentally chopped off a sub/function by placing code before or after the sub/function declaration (Public sub... or, End sub) or I've made a syntax mistake.
 
I think Allen Browne has a hack that addresses this problem of Comboboxes with huge numbers:

http://allenbrowne.com/ser-32.html

Linq ;0)>

Thanks for your input. I will give that a try later on when I am done putting the rest of this monster together. I was hoping there was a built in procedure that accomplished the same thing but looks like there isn't any.
 

Users who are viewing this thread

Back
Top Bottom