I am using SQL 2005 to create my database. I am using Access 2003
data access pages to interact.
I am using Dropdown boxes to search for records. Here is how I am
creating my drop down boxes.
"First, create a combobox (or dropdownlist) and set its ListRowSource
to a
query (recordset) returning the list of the names with their IDs; then
set
the ListBoundField to the IDs (primary key) for this list and the
ListDisplayField to the field for the names.
Then, in the GroupLevelProperty, set the GroupFilterControl to this
dropdownlist and the GroupFilterField to the same field as the ID
above..
The primary key field for the recordset of the page should also be the
same
field. Now, the combobox will serve as a filter for the named."
The query (in this case a view in SQL 05) is written as such:
SELECT TOP (1000) MANAGER, MPK
FROM dbo.Employee
ORDER BY MANAGER
In this table the MANAGER field contains the Manager Name and the MPK
field is the Primary Key for the table.
The query returns a result set that lists the Manager Names in
Alphabetical Order.
When I create the Data Access Page and add the Drop down box as
described above I get a nice drop down containing my Manager Names,
but they are not in Alpha Order, they are in order of the Primary Key.
Can anyone see a mistake in the way I am doing this? Is there a trick
to fooling the DAP into displaying the way I want it to?
Thanks for any input.
Woodman