query question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am looking to have my query to pull info from a table and not to return any
duplicate values. In my table I have a date column and I want to populate
(from this query) a combo on a form with just one listing of each date in
table.
 
try

SELECT MyTable.MyDateField
FROM MyTable
GROUP BY MyTable.MyDateField;

substitute the correct table and field names, of course. paste the above SQL
into the SQL view of your query.
if you prefer to work in query design view instead: create a new query. in
design view, add the table and put the date field in the query grid. on the
toolbar, click the Totals button (it looks like a funny-looking capital E,
or a capital M lying on its' side).

hth
 
I want to populate
(from this query) a combo on a form with just one listing of each date
in table.

SELECT DISTINCT MyDate
FROM MyTable
ORDER BY MyDate


Hope that helps


Tim F
 
Back
Top