Hello,
I am trying to create a text field and save it to a table. It is to be a combination of letters and numbers, indicating semester, course type, course number, and an asterisk if enrollment is limited:
The first three or four letters, followed by a hyphen, will be built in a query based on fields from other tables:
CourseCodeFront: IIf([CurrentSemester]="Fall" And [SingleOrMulti]="Single-Session","FSS-",IIf([CurrentSemester]="Fall" And [SingleOrMulti]="Multi-Session","FS-",IIf([CurrentSemester]="Spring" And [SingleOrMulti]="Single-Session","SSS-",IIf([CurrentSemester]="Spring" And [SingleOrMulti]="Multi-session","SS-"))))
Then, I want the user to append a field name CourseCodeNumber in my table (I have sorted the courses by times and dates, and presented them in a form, so the user can assign consecutive numbers.
Then, in some cases, I want an asterisk applied, based on the same query as above, this expression: Asterisk: IIf([MaximumSize]>0,"*","")
So, combined then into CourseCode (already a field in my table) : CourseCodeFront & CourseCodeNumber & Asterisk
The final result should look like these examples: FFS-1, FS-1, FS-3 etc.
And, I would like this to be save CourseCode in the table. The value doesn't change and it is called upon many times, so I hate to recalculate it each time.
As an added wrinkle, I do need to also keep CourseCodeNumber for sorting, since CourseCode itself is a text field now.
All this works fine, except that I am not able to save to the table without actually typing it in. I had hoped that the user could add just the number (CourseCodeNumber). But, while I can display the CourseCode, it does not save to the table.
I would appreciate any help. I am not a programmer, so I am hoping this can be done via a query.
Thanks!