access 没有触发器,你只能在插入一条数据时自己算出是那个等级然后再赋相应的值了.

解决方案 »

  1.   

    随录入处理:窗体上放一个txtRank(TextBox)
    private sub txtScore_validate(byval cancel as integer)
    txtScore = trim(txtScore)
    if txtScore = "" then exit sub
    select case val(txtScore)
    case is >= 90
    txtRank = "优"
    case is >= 75
    txtRank = "良"
    case else
    txtRank = "中"
    end select
    end sub批量处理:
    updata table1 set 等级='' where 成绩>=90
    updata table1 set 等级='' where 成绩>=75 and 成绩<90
    updata table1 set 等级='' where 成绩<75
      

  2.   

    alter table tablename
    add 等级 char(2) null