Problem solved – used instr on control names rather than polling by Tag. Theory: MS doesn’t tolerate more than one tag setting for a form, or something equally goofy.
I have this:
Public Function CheckUserEdits() Dim UserCtlString As String Dim UserCtl As Control Dim ctl As Control Dim ContainsNulls As Integer For i = 0 To 7 For Each ctl In Forms!RUG.MainTab.Pages(i).Controls With ctl If .Tag = "OR" Then If IsNull(.Value) Then ContainsNulls = 1 Debug.Print "Control name: " & .Name Debug.Print "Control value: " & .Value End If End If End With Next Next i End Function
just debug.print to see if the loop events work. they do. each form control has a smart tag and tag set to OR.
Now! when i do this:
Public Function CheckUserEdits() Dim UserCtlString As String Dim UserCtl As Control Dim ctl As Control Dim ContainsNulls As Integer For i = 0 To 7 For Each ctl In Forms!RUG.MainTab.Pages(i).Controls With ctl If .Tag = "UE" Then <-- that's the ONLY ONLY ONLY change If IsNull(.Value) Then ContainsNulls = 1 Debug.Print "Control name: " & .Name Debug.Print "Control value: " & .Value End If End If End With Next Next i End Function
The code fails: “Object does not support this property or method”. The control tags are “UE” in Smart Tags and Tags. several controls are drop-downs, but not all. i can’t even get a list based on the control tag, and changing UE to something like, say, WTA, doesn’t help either.