在型號欄位的AfterUpdate事件, 撰寫程式.
大約如下: (使用DAO)
dim str_Num as string
str_Num = left(me.型號,3)
dim rs as recordset
set rs = currentdb.openrecordset("Select 品名 from 品名代碼 Where 代碼 = '" & str_Num & "'", dbopensnapshot)
if rs.recordcount <> 0 then
me.品名代碼 = rs("品名")
end if