【发布时间】:2019-12-19 07:02:35
【问题描述】:
我在 MS Access 中有 VBA 代码,由一个按钮触发,它将填充空白字段。
我想知道如何重复该操作,直到填充所有空白字段。
循环是如何工作的?
If Me.Team = "GSAP Accounts" Then
If Me.Mantainer_Status = "Completed" Then
If IsNull(Me.Line_Items) Then
If Me.Line_Item_Passed_After_Validation < Me.Total_Line_Items_Raised Then
Me.Line_Items = Me.Total_Line_Items_Raised.Value
Else
Me.Line_Items = Me.Line_Item_Passed_After_Validation.Value
Forms!KPIREFRESH.Requery
End If
End If
End If
End If
【问题讨论】:
-
For Each ctl In frm.Controls [next line>] If ctl.ControlType = acTextBox Then do_your_thing Endif Next ctl
-
有很多关于这个主题的教程。你对循环结构到底有什么不了解的地方?