If MainTable.name="表名" With Tables("表名") .Position = .Rows.Count - 1 .Select(.position,0) End WithEnd If
将代码放在项目的MainTableChanged事件中