Module Function frm.setfocus runtime 2449 error

倾然丶 夕夏残阳落幕 提交于 2019-12-11 11:39:29

问题


I have a problem with a function where it is causing a "RunTime error 2449, There is an invalid method in an expression" on the frm.setfocus line. The form being referred to is a subform, please can anyone help with this error?

The function is:

Function NewItemsSaveAfter(frm As Form)

If frm.Parent.PartSaveYesNo = "Yes" Then
    varCurrRec = frm.CurrentRecord
    frm.Parent.Form.Refresh
    frm.SetFocus
    DoCmd.GoToRecord , , acGoTo, varCurrRec
Else
End If

End Function

回答1:


Set the focus to the child control containing the subform.



来源:https://stackoverflow.com/questions/23384037/module-function-frm-setfocus-runtime-2449-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!