Private Sub Report_Open(Cancel As Integer)
Dim strResultDesc As String
strResultDesc = DLookup("Description", "[products/stock]", "[Product Code] = Me.txtResultPC.Value")
Text20.Value = strResultDesc
End Sub
这是我目前拥有的代码,我收到一条错误消息,指出存在以下问题:
[Product Code] = Me.txtResultPC.Value
任何人都可以发现任何东西吗?
更新:
也试过这种方法,
Private Sub Report_Open(Cancel As Integer)
Dim strResultDesc As String
strResultDesc = DLookup("Description", "[products/stock]", "[products/stock].[Product Code] = [Result PC]")
Me.Text20.Value = strResultDesc
End Sub
谢谢,
鲍勃·P