Default Value as Current Semester

andyski101

Andy K
Local time
Today, 05:50
Joined
Jun 13, 2005
Messages
61
Our school writes its semesters as F05, W06, S06, J06. The letter stands for the season (fall, winter, spring, summer) and the two numbers are for the year. I have two fields on different tables. The first one uses the semester (F05) to tell us when they joined the club. The second uses only the year (2005) to tell us what year the race occured.

Anyway, what I want to do is set the default value as the current semester or year. I have tried setting the Format to yyyy and Default value to Year() but neither of those makes Access very happy, especially since Year() needs a number between the parenthesises. I don't want to have to change the defaults each semester if I can aviod it. Any advice would be greatly appreciated, thanks.
 
Andy, I think I would set this up as a value in a system type table.

Say have a table called tblSystemVars with a fld called recordNum as the pk, a fld called varName and a fld named varValue. Then for this value do a record where the varName is called CurrentSemester and change it with a quick a simple form. Then you use it as the default value with a simple dlookup().

Make sense?

(This system variables table comes in handy in a lot of other ways as well...)
 
I hadn't heard of a system variables table before, but it definetly makes sense. Thanks Ken.
 

Users who are viewing this thread

Back
Top Bottom