如何用A窗体中的命令按钮打开B窗体,并使B窗体中甲文本框中的值为乙。
Private Sub 命令71_Click()
On Error GoTo Err_命令71_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "B"
DoCmd.OpenFORM stDocName, , , stLinkCriteria
Exit_命令71_Click:
Exit Sub
Err_命令71_Click:
MsgBox Err.Description
Resume Exit_命令71_Click
End Sub
上面是打开窗体的代码,但如何在里面加入使B窗体中甲文本框中的值为乙呢?谢谢! [em14][em14]
Private Sub cOMMAND1_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "B"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Forms![B]![ JIA] = "YI"
End Sub
(Sorry,I have no Chinese System in my PC.)