Unique records in forms

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?
 
J

Jeff Boyce

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>
 
J

Jeff Boyce

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>
 
G

Guest

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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top