K
Kosio
I am creating a form that goes through tables and displays certain
records in a listbox based on a sertain search criteria. I would like
to do this in VBA if it is possible instead of using queries since I
would like to manipulate the listbox in which the data is displayed.
I understand that I could create a listbox that uses a query to
populate it's rowsource and then copy that data over to a listbox that
has a value rowsource, but I would like to avoid using multiple
listboxes on my form.
Is there a way for me to sort a table/recordset in VBA using a
heap-sort per say and then use a binary search on the record (since
it's in order), to find my desired record.
I thought it would go something like:
Dim dbDatabase as DAO.Database
Dim rsRec as DAO.Recordset
Dim intI as integer
set dbDatabse = CurrentDb
set rsRec = dbDatabse.OpenRecordset("Table Name")
If Not rsRec.EOF then
rsRec.MoveLast
rsRec.MoveFirst
endif
Now I would like be able to use a heap sort algorithm with rsRec as my
array. Will anything I do to this record affect the way it is stored
in Access?
records in a listbox based on a sertain search criteria. I would like
to do this in VBA if it is possible instead of using queries since I
would like to manipulate the listbox in which the data is displayed.
I understand that I could create a listbox that uses a query to
populate it's rowsource and then copy that data over to a listbox that
has a value rowsource, but I would like to avoid using multiple
listboxes on my form.
Is there a way for me to sort a table/recordset in VBA using a
heap-sort per say and then use a binary search on the record (since
it's in order), to find my desired record.
I thought it would go something like:
Dim dbDatabase as DAO.Database
Dim rsRec as DAO.Recordset
Dim intI as integer
set dbDatabse = CurrentDb
set rsRec = dbDatabse.OpenRecordset("Table Name")
If Not rsRec.EOF then
rsRec.MoveLast
rsRec.MoveFirst
endif
Now I would like be able to use a heap sort algorithm with rsRec as my
array. Will anything I do to this record affect the way it is stored
in Access?