Unique records in forms

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

Guest

Hi,
I have a form that displays a summary line for each record in a table, users
can click on a command button to expand the summary (which opens a form
detailing the record)

The form is based upon a query as the form is only for viewing records and
not updating/changing or adding new records. The query shows every records
which is how it should work, however I want the form to only display records
where the first field is unique.

I.E A Room table containing room records - SiteID (Auto), SiteName (Text)
and RoomName (Text)

There can be many Rooms for one particular Site so the Site field contains
duplicate entries.

I want the form based on qrySite (based on the table above) to only display
Unique SiteNames.

Help anyone?
 
If you need a list of unique site names, one approach would be to create a
Totals query that groups by site name. Another is to create a query, select
only site name, and set the Unique Values property to Yes.

Good luck

Jeff Boyce
<Access MVP>
 
Create a new query.

Add in the table.

Select the site name field for display.

Click on the "sigma" toolbar button.

Select "GroupBy" (should be the default).

Run it.

Good luck

Jeff Boyce
<Access MVP>
 
Thanks Jeff - that works perfectly!
--
Kevin


Jeff Boyce said:
Create a new query.

Add in the table.

Select the site name field for display.

Click on the "sigma" toolbar button.

Select "GroupBy" (should be the default).

Run it.

Good luck

Jeff Boyce
<Access MVP>
 
Back
Top