|
请教一下,我运行以下代码就会提示:要求对象!是为什么啊?点击按钮,在B窗口里按照A窗口里的单位帐号显示出相同单位帐号的记录
Private Sub 命令184_Click()
On Error GoTo Err_命令184_Click
Dim stDocName As String
Dim stLinkCriteria As String
Dim sql As String
Dim danwei As String
danwei = Me![单位帐号1]
stDocName = "个人信息"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.GoToControl "单位帐号1"
Forms![个人信息]![单位帐号1] = danwei
sql = "select * from 个人信息 where [单位帐号] =" & froms![个人信息]![单位帐号1]
Forms.个人信息.RecordSource = sql
Exit_命令184_Click:
Exit Sub
Err_命令184_Click:
MsgBox Err.Description
Resume Exit_命令184_Click
End Sub
[ 本帖最后由 gq402402 于 2007-11-27 09:24 编辑 ] |
|