0

Currently, I have a behavior implemented which allows my MS Acess DB to go to a specific record in another subform. However, this leaves the filter on, and when I turn off the filter the subform returns back to the first entry in the overall set. Is there a way I can navigate to this record, then turn off the filter but stay at the record I found?

I've been trying to pop VBA code into on enter or on click but I can't seem to figure out what to do.

4

1 回答 1

0

使用子表单的主键导航回记录。在您的表单上放置一个命令按钮,并在按钮的事件过程中执行以下操作:

Dim ID as Variant

With [SubForm].Form
  ID=!PrimaryKey.Value
  .FilterOn = False
  .Recordset.FindFirst "[ID]=" & ID
End With

那应该让你进入球场。

于 2011-05-25T20:40:54.633 回答