返回列表 上一主題 發帖

[發問] access 資料自動帶入

在型號欄位的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

以上程式, 參考看看.

TOP

        靜思自在 : 屋寬不如心寬。
返回列表 上一主題