J
janell81002
Hello, I am an Access beginner trying to build a database and I'm stuck.
I have a tblCenterInfo with information organized by the field CenterNumber
(the primary key). I have a form based on a query of tblCenterInfo, the query
with a paramater value [Enter CenterNumber]. I've inserted a combo box (via
the combo box wizard) into the form based on the DistrictManager field in
tblCenterInfo. SQL:
SELECT MainCenterInfoTable.CenterNumber, MainCenterInfoTable.DistrictManager
FROM MainCenterInfoTable;
This pulls all the records from the table, and I want to use SELECT DISTINCT
to limit this drop-down list.
My problem is, when I insert DISTINCT after SELECT in the above SQL, the
combo box still returns all the values from DistrictManager instead of
distinct ones. I think this must have something to do with the inclusion of
MainCenterInfoTable.CenterNumber in the SQL, but when I take that phrase out,
the drop-down list doesn't return any values at all. Does this have to do
with the form being based on a parameter value query? How can I make the
DISTINCT work?
Thank you so much for your help.
I have a tblCenterInfo with information organized by the field CenterNumber
(the primary key). I have a form based on a query of tblCenterInfo, the query
with a paramater value [Enter CenterNumber]. I've inserted a combo box (via
the combo box wizard) into the form based on the DistrictManager field in
tblCenterInfo. SQL:
SELECT MainCenterInfoTable.CenterNumber, MainCenterInfoTable.DistrictManager
FROM MainCenterInfoTable;
This pulls all the records from the table, and I want to use SELECT DISTINCT
to limit this drop-down list.
My problem is, when I insert DISTINCT after SELECT in the above SQL, the
combo box still returns all the values from DistrictManager instead of
distinct ones. I think this must have something to do with the inclusion of
MainCenterInfoTable.CenterNumber in the SQL, but when I take that phrase out,
the drop-down list doesn't return any values at all. Does this have to do
with the form being based on a parameter value query? How can I make the
DISTINCT work?
Thank you so much for your help.