Hi, I am new to Access and have been making up a dB for work. I developed a form for a single layer dB where the form is as:
Design View
The Title columns are text boxes. The left is the category row title and the right parts of the rows ate the totals of the Text box headers. If I have all the categorys filled in you will get the complete design. Where I am missing one total in one of the categories, the complete row id deleted.
This is an example of one query in SQL format I use to break down the data:
SELECT Count([Change Request].[Final VOTE]) AS [CountOfFinal VOTE], [Change Request].[Final VOTE]
FROM [Change Request]
WHERE ((([Change Request].Type)<>"Software") AND (([Change Request].[Action Complete])=Yes) AND (([Change Request].Date_Closed) Between DateSerial(Year(Date()),Month(Date())+1,-7) And DateSerial(Year(Date()),Month(Date())+1,0)))
GROUP BY [Change Request].[Final VOTE], [Change Request].[CATEGORY2 (LEVEL 3 ONLY)]
HAVING ((([Change Request].[CATEGORY2 (LEVEL 3 ONLY)])=1));
I have added an extra 30 records to make the dB do what I want. Each record sets up the form, and I subtract 1 from each during the process with an expression in a rollup query of the 6 queries.
Example: Count LVL1: [Count Level 1].[CountOfFinal VOTE]-1
I also have 6 other queries where I get the end sum for the footer row rolled into one query.
Example: TTL Lvl 2: CountOfFinal VOTE
Secondary Issue
At this point if I use the date resriction I get the same output on the form - it starts missing rows. This is due to the Date_Closed being null and I cannot figure out how to do an if then macro or SQL or VBA to have it filled in. IE: IIF([Change Request].[Change_Requested]="Do not delete") THEN ([Change Request].[Date_Closed]=Date().
That would fix the issue. BUT
Primary Issue
If this issue is fixed then the Secondary issue is moot. The real issue for me is where the count causes the row to be null in that query.
It is where [Change Request].[Final VOTE] is null and the rest of the SQL is true:
WHERE ((([Change Request].Type)<>"Software") AND (([Change Request].[Action Complete])=Yes) AND (([Change Request].Date_Closed) Between DateSerial(Year(Date()),Month(Date())+1,-7) And DateSerial(Year(Date()),Month(Date())+1,0)))
Countof becomes null or Final Vote becomes null. What can I do to correct this?
Any assistance would be appreciated.
Thanks
Thompyt