I have the following query:
PARAMETERS Forms!TimeSheet!ClientID Text, Forms!TImeSheet![Date] DateTime;
SELECT DISTINCTROW First(TimeSheet.Date) AS [Date Field], First(TimeSheet.ClientID) AS [ClientID Field], Count(TimeSheet.Date) AS NumberOfDups
FROM TimeSheet
GROUP BY TimeSheet.Date, TimeSheet.ClientID
HAVING (((Count(TimeSheet.Date))>1) AND ((Count(TimeSheet.ClientID))>1));
I want to write a function that runs this query when the user pushes a 'Submit' button, and if the value in NumberOfDups is Null, fills txtDaysPaid (a field on the current form) with a value of '1', else leave txtDaysPaid null. Any and all help appreciated. Thanks!
PARAMETERS Forms!TimeSheet!ClientID Text, Forms!TImeSheet![Date] DateTime;
SELECT DISTINCTROW First(TimeSheet.Date) AS [Date Field], First(TimeSheet.ClientID) AS [ClientID Field], Count(TimeSheet.Date) AS NumberOfDups
FROM TimeSheet
GROUP BY TimeSheet.Date, TimeSheet.ClientID
HAVING (((Count(TimeSheet.Date))>1) AND ((Count(TimeSheet.ClientID))>1));
I want to write a function that runs this query when the user pushes a 'Submit' button, and if the value in NumberOfDups is Null, fills txtDaysPaid (a field on the current form) with a value of '1', else leave txtDaysPaid null. Any and all help appreciated. Thanks!