If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
Switch not working
It worked!!!!!! Thank you Thank you Thank you!
"John Spencer" wrote: Is demographic.Work a number field or a text field. In one place you treat it as a number field 14 and elsewhere as a text field "1". I am going to guess it is a text field. SELECT DEMOGRAPHIC.WORK , STUDENT_COURSE.DATE_OF_REGISTRATION , DEMOGRAPHIC.WORK , STUDENT.STUDENT_ID , IIF(Demographic.Work in ("1","2","3") or Demographic.Work is null,Demographic.Work,"19") as CalcValue FROM (STUDENT INNER JOIN DEMOGRAPHIC ON STUDENT.STUDENT_ID = DEMOGRAPHIC.STUDENT_ID) INNER JOIN STUDENT_COURSE ON STUDENT.STUDENT_ID = STUDENT_COURSE.STUDENT_ID CalcValue is the name of the value that is calculated in the expression. John Spencer Access MVP 2002-2005, 2007-2008 The Hilltop Institute University of Maryland Baltimore County Student Databaser wrote: Ok, sorry i wasn't clear. Here are a few rows of what the query returned. What didn't work is that it didn't make numbers 4-19 appear as 19 for the work field, and under CalcValue it says #Error. I assume this is because i should have entered in some other field or expression but i was sure what John meant. Thanks so much for your help! I am obviously a novice at this and these forums really help me to learn. Expr1000 DATE_OF_REGISTRATION WORK STUDENT_ID CalcValue 4 2/13/2008 4 aa0703go #Error 2 8/28/2007 2 ab0101ja #Error 2 9/10/2007 2 ab0101ja #Error 2 9/10/2007 2 ab0101ja #Error 8 7/18/2006 8 ab0109na #Error 18 10/17/2007 18 ab0601sa #Error |
|
Thread Tools | |
Display Modes | |
|
|