Hello, I have a form with just combo boxes and text boxes and I need to loop through all the controls in just the forms header in order to show a few hidden buttons if everything has a value and if not show message and dont show buttons
Printable View
Hello, I have a form with just combo boxes and text boxes and I need to loop through all the controls in just the forms header in order to show a few hidden buttons if everything has a value and if not show message and dont show buttons
I don't usually do Access, but something like thisCode:Dim Ctrl As Object
Dim MissingValues as boolean
For Each Ctrl in Me.Controls
If Ctrl.ControlType = acTextBox then
If Ctrl.Value = "" Then
MissingValues = True
Exit For
End IF
ElseIf Ctrl.ControlType = acListtBox then
If Ctrl.Value = "" Then
MissingValues = True
Exit For
End IF
End if
Next
If MissingValues Then
Show message
Else
Show buttons