为此,我使用了GORM提供的BeforeUpdate钩子。我的BeforeUpdate钩子: if (tx.Statement.Changed("= nil) { log.Fatal(err) }
// Not sure how to access this "newPassword" value on the "BeforeUpdate"
我对使用BeforeUpdate有点陌生,所以我不确定我是否正确地使用了它;下面是我的BeforeUpdate代码:
Private Sub Form_BeforeUpdate(Cancel As Integer我尝试将此作为测试,因为我的实际代码中的MsgBox也没有在BeforeUpdate事件中触发。但不明白为什么..。如果用户将其中一个字段留为空白,这将触发BeforeUpdate事件中if语句的真实部分,对吗?“如果然后移动到另一个记录或保存记录,表单的BeforeUpdate