我正在尝试查询重新查询表单后刚刚附加在拆分表单上的记录。以下代码不会产生错误,但也不会转到新记录。所有参数均正确。有什么想法吗?
Forms!frmAddNewComponent.Requery
FindRecord Forms!frmAddNewComponent, Forms!frmAddNewComponent!txtID.Value, "ID"
Public Sub FindRecord(Component As Form, PK As Long, PKField As String)
With Component.RecordsetClone
.FindFirst PKField & "=" & PK
If .NoMatch Then
MsgBox "Record not found!", vbCritical
Else
Component.Bookmark = .Bookmark
End If
End With
End Sub