@theDBguy would we be able to remove the AvgPass calculation from the VBA update events? I was curious if we did this then the scores would default back to the recordsource of the form which originally displayed the correct scores.
I tried removing them but got a Run-time error '3141': SELECT...
Ah yes I gotcha. I implemented the same code to the Unit combo box and it worked! The ASDs were displaying correctly, for the correct units, for the correct places. The only thing thats wonky now is the scores are totally over the place, but I will keep looking into this. I tried implementing...
Ah okay yes I see that now. So for more context, when you first open the form nothing should display. Only when you select the Place/Unit/Date boxes should it display the results for the controls tested at that Place, only for the selected unit and date.
All "Places" should have expect to have...
Yes its definitely changing to filter the right things! Just not working correctly on the ASD column.
After further thought, would it be better to add the = Unit to the SimpleCSV function?
SimpleCSV("SELECT DISTINCT ASD FROM [Pivoted Data] WHERE [Control ID]='" & [Control ID] & " AND [Unit] =...
Hey. I looked at the results, I don't think anything changed from before. Probably because the ASDs mostly rely on the Unit combo box, so code for that box might have more of an effect on the results.
Hey there. Currently, for each combo box AfterUpdate even I have a:
SearchForRecord command WHERE =="[combo box field] = " & "'" & [Screen].[ActiveControl] & "'"
and a
Requery command
Do I replace these with a Refresh command?
Perfect thank you. Lastly, I want to include the combo box selections as part of the WHERE clause in the SimpleCSV() function. Currently it is concatenating all ASDs associated with the control, regardless of the filters.
Would I do this?
SimpleCSV("SELECT DISTINCT ASD FROM [Pivoted Data] WHERE...
Thanks!
Quick follow-up question: if I want to change how the results are concatenated to a new line in the record instead of a comma, do I modify this part of the SimpleCSV module?
Public Function SimpleCSV(strSQL As String, _
Optional strDelim As String = ",") As String
Posting the solution here (credit to @theDBguy) in case other people run into this issue. This code was implemented into the recordsource of the form:
SELECT [Pivoted Data].Process, [Pivoted Data].[Control ID], SimpleCSV("SELECT DISTINCT ASD FROM [Pivoted Data] WHERE [Control ID]='" & [Control...
Wait I'm stupid - I had misspelled one of the fields! It looks like its working now. THANK YOU!!!!!
I'll let you know if anything else breaks - hopefully not (: - but once again thanks, I really appreciate this forum and your help.
Awesome thanks again!
When I implemented the module into the original file I get this error when using the form:
Run-time error '3061': Too few parameters. Expected 1 ->I get the error for every row of the results, and it almost seems like its caught in a loop. It occurs on this line of the...
Hey appreciate the help! Just looking at it now - sorry I forgot to add the modules in that file so thanks for doing that for me.
But other than that, is changing the record source of the form the only change you made?