Hi I have a database of 2 tables with a 1 to many relationship. I am trying to create a query to use with a form to print the data. The first table has various details about the day and used date as primary. The second table has the details of the hills climbed that day. I want a query which shows the details of the day from the first table with the hills listed below. Everything I have tried list the first table with every hill rather than just once. I want to use the query to create a form to print. Any ideas appreciated.
Forms are for input, reports for printing.
My mistake its a report I trying to do via a query.
SELECT "Days".*, "Hills".* FROM "Days" JOIN "Hills" ON "Days"."Date" = "Hills"."Date"
Create a report from that, possibly grouped by dates.
That still give me a days entry for every hills entry. Should there be a distinct days.date somewhere so they are not repeated?
Every record has the full information from both tables. Right-click the query, call the report wizard, choose the columns you need and group by date.
Hi Thanks for the info but still can’t get one ‘Days’ and x number of ‘hills’ below it. Still gives me a ‘Days’ for every ‘Hills’.
If you are creating a report you should set “Days” as a ‘group header’. “Hills” should appear in section ‘Details’.