试试改成
Dim pg As WinForm.TabControl = e.Form.Controls("页签")Dim n As String = pg.SelectedPage.Text '定义n为当前页签的名称e.form.controls(n).Table.Filter = "类别 ='" & n & "'"