I am trying to get the number of dates on the same day. In other words if I enter a date that already exists for that day, then warn! Example Below:
tblCatchDetails
CDte Primary Key
CatchDate Date
Count Number of Dates on Same Day
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
Re: Count Number of Dates on Same Day
This could be done by indexing the field. Set the field's Indexed property to Yes (No duplicates).
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.
-
- 4StarLounger
- Posts: 550
- Joined: 30 Jul 2014, 23:58
Re: Count Number of Dates on Same Day
I want to be able to allow duplicates, just warn if one exists!
-
- Administrator
- Posts: 78545
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Count Number of Dates on Same Day
If you want to count the number:
- Activate the Create tab of the ribbon.
- Click Query Design.
- Access displays the Show Table dialog.
- Add tblCatchDetails, then close the dialog.
- Add CatchDate to the query grid, then CDte
- Click to highlight Totals in the Show/Hide group of the ribbon.
- This adds a Total row to the query grid. The default is Group By for each column.
- Change the Total option of CDte to Count.
- Switch to Datasheet View to inspect the result.
- Activate the Create tab of the ribbon.
- Click Query Design.
- Access displays the Show Table dialog.
- Add tblCatchDetails, then close the dialog.
- Add CatchDate to the query grid, then CDte
- Click to highlight Totals in the Show/Hide group of the ribbon.
- This adds a Total row to the query grid. The default is Group By for each column.
- Change the Total option of CDte to Count.
- Switch to Datasheet View to inspect the result.
Best wishes,
Hans
Hans