Hi everyone,
First time poster, but I have been directed to this site by google several times over the past few months. I'm still learning Access, and am working on some reports that had been done by my predecessor. They were kind enough to leave detailed notes on how the reports were generated, but the steps involve running a lot of queries (that are very basic in and of themselves). We decided to change the data window for the report, so I'm going back and re-calculating for the past 5-years. Needless to say, I thought "there has to be a better way."
I'm looking at student placement into ESL classes. After separating out some of the information I was given, I have several different categories of placements. These are indicated by my "Maxscore" field. Students are placed in a pattern as follows:
0 = ESL 51A
1 = ESL 51B
2 = ESL 51C
The original steps were:
Is it a 0? Run this query to make it say "ESL 51A"
*change query to say*
Is it a 1? Run this query to make it say "ESL 51B"
*change query to say....*
Is it a 2? Run this query to make it say "ESL 51C"........
I wanted to save time, so I learned that MS Access has an analogue to the nested if statement, I thought I could use that to put in all three statements into 1 query.
That is the code I used. On the surface, it seemed to work. Some of the records updated appropriately. However, there are several cases where the student should have placed into one of those categories but were evaluated to be "false." I haven't noticed any commonality as to why this is happening. Some of the improper falses are 51A, some are 51B, and some are 51C.Code:UPDATE Placements_FA11_ECC INNER JOIN MaxScores_ESL_2011 ON Placements_FA11_ECC.StudentID = MaxScores_ESL_2011.StudentID SET Placements_FA11_ECC.ESLO = IIf([MaxScores_ESL_2011].[MaxScore]="2","ESL 51C", IIf([MaxScores_ESL_2011].[MaxScore]="1","ESL 51B", IIf([MaxScores_ESL_2011].[MaxScore]="0","ESL 51A","")));
Is there something that I'm missing? I keep checking for the "any" key, but I can't find it. And I have tried restarting Access as well (aka, "turning it off and on again"). Apologies for any no0bishness.