|
子窗体中的代码:
Option Compare Database
Option Explicit
Public strThcd, strBbcd As Variant
Private Sub 版本_AfterUpdate()
strBbcd = Me.版本.Value
Debug.Print "sub" & strThcd
Debug.Print "sub" & strSjcd
End Sub
Private Sub 图号_AfterUpdate()
strThcd = Me.图号.Value
End Sub
父窗体:
Option Compare Database
Option Explicit
Public strSjcd As Variant
Private Sub Combo4_AfterUpdate()
strSjcd = Me.Combo4.Value
End Sub
Private Sub Command6_Click()
DoCmd.SetWarnings True
Debug.Print "z" & strSjcd
Debug.Print "z" & strThcd
Debug.Print "z" & strBbcd
DoCmd.RunSQL "INSERT INTO 零件补充信息表(图号,版本,设计员ID) VALUES(strThcd,strBbcd,strSjcd)"
End Sub
|
|