|
Question : Tricky DCount for me - maybe not you
|
|
I have this DCount (Access97) which works just perfectly - except that the client has asked it be modified so that it doesn't count repeated ID numbers - (example this count gives me all the attendees of the an event whose elegibility is CSS between the two dates which the user specfies) I need however the count to only output those with distinct ID nums:
=nz(DCount "ATTENDEE","405UnitsServID","[ELEGIBLITY] = 'CSS' And Date Between #" & [Forms]![405ls2cp]![startdate] & "# And #" & [Forms]![405ls2cp]![enddate] & "#"),0)
I did try this which didn't work: (note 405junc is where the IDs data is stored)
=nz(DCount("ATTENDEE","405UnitsServID","[ELEGIBLITY] = 'CSS' And [Forms]![405junc]![ID] Is Distinct And Date Between #" & [Forms]![405ls2cp]![startdate] & "# And #" & [Forms]![405ls2cp]![enddate] & "#"),0)
also in the underlying query 405UnitsServID I tried to place this line in the criteria for ID:
(SELECT DISTINCT [ID])
but nothing has worked - any suggestions or help I would be grateful - I need to put this project to rest -
Thanks
Kevin
|
|
Answer : Tricky DCount for me - maybe not you
|
|
If you like, you can EMail me the form, table and queries involved along with a description of a selection of dates an the restuling count of IDs you expect and I will have a look at it for you. EMail address in my profile.
|
|
|
|