Recordset Help ... Please!!!!

11-01-2004, 04:34 PM
I am having trouble trying to show contacts to users.
Here's what I have:
Table: Contacts
Row Count: 2,768,352

I want the user to click 'File -> Contacts' and a listview, showing about 13 of them at a time, shows the contacts. They can start typing the lastname and the recordset starts filtering as they type. Or, they can click on a scroll bar and scroll through them. My question is how would I do this without loading the entire recordset into memory and crashing the local computer?

11-01-2004, 06:07 PM
you could place a combo box control named cboContacts on your form, and in the after_update event, refresh the RecordSource like so:

sub cboContacts_After_Update()

if not nz(cboContacts,"") = "" then
cboContacts.RecordSource = "SELECT * FROM Contacts WHERE Contact
LIKE " & chr(34) & cboContacts & "*" & chr(34)

end if

end sub

11-01-2004, 06:56 PM
Hello LuckyShot,
The way I see it. if you use a scroll bar to navigate the records then you have to load the entire records your query return.

But if you want to show only the first 13 records, you can use the ROWNUM value of your record.
To Autoquery your records eveytime you supply a value in a textbox you can use couch612's code. :)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum