我有一个on_load子设置子窗体的过滤器,如下所示:
Me.TabMonths.Pages("pge" & i).Controls("frmTileSchedule" & i).Form.Filter = "[MonthNo] = " & i & " and [YearNo] = " & intYear & ""
Me.TabMonths.Pages("pge" & i).Controls("frmTileSchedule" & i).Form.FilterOn = True
我现在还需要在名为“Tile”的字段上按字母顺序对其进行排序,并尝试了
DoCmd.SetOrderBy "Tile ASC"
以及
Me.TabMonths.Pages("pge" & i).Controls("frmTileSchedule" & i).Form.OrderBy = "Tile ASC"
但这些没有运气。有人可以帮忙吗?
答案 0 :(得分:2)
它类似于过滤:
Me.TabMonths.Pages("pge" & i).Controls("frmTileSchedule" & i).Form.OrderBy = "Tile ASC"
Me.TabMonths.Pages("pge" & i).Controls("frmTileSchedule" & i).Form.OrderByOn= True