我打开了一个表单,并将ID号设置为另一个表单的超链接。我已经创建了下面的代码来打开,但它现在出现了Enter Parameter Value对话框。当我输入ID号时,它会正确打开。
Private Sub StudentID_Click()
Dim recordID As Integer
recordID = Me.StudentID
DoCmd.OpenForm "Students Extended", , , "Studentid=StudentNumber"
End Sub
答案 0 :(得分:0)
我猜你是在追求这样的事情:
Private Sub StudentID_Click()
Dim recordID As Long
recordID = Me.StudentID
DoCmd.OpenForm "Students Extended", , , "Studentid = " & recordID & ""
End Sub