Ensure all fields are filled

What are shadows?
 
One of the BorderStyle properties. Shadowed I think it's called.
 
Can't find it in Access 2007.
 
Oops... Special Effect property, not BorderStyle. Sorry!
 
Even with the Special Effect set to Shadowed it doesn't' work.
 
Even with the Special Effect set to Shadowed it doesn't' work.

For us, BackColor has been working very well for an invalid field value indication...

Code:
  'Update UI with good/bad field indications
  'fldpartnumber
  If flgBadpartnumber = True Then
    MePointer.fldpartnumber.BackColor = vbRed
    flgBadValue = True
  Else
    MePointer.fldpartnumber.BackColor = vbWhite
  End If
 
This is my latest attempt but it ignores the check boxes and option buttons.

Code:
' Ensure all fields are filled
    For Each ctl In Me.Controls
        Select Case ctl.ControlType
            Case acTextBox, acComboBox, acListBox
                If Len(Nz(ctl.Value, vbNullString)) = 0 Then
                    With ctl
                        Select Case ctl.ControlType
                            Case acTextBox, acComboBox, acListBox
                                .BorderColor = vbRed        ' Red
                                .BorderWidth = 1            ' 1 point
                                .BorderStyle = 1            ' Solid
                            Case acCheckBox, acOptionButton
                                .SpecialEffect = 4          ' Shadowed
                                .BorderColor = vbRed        ' Red
                                .BorderWidth = 3            ' 3 point
                        End Select
                    End With
                End If
        End Select
    Next ctl
 
This is my latest attempt but it ignores the check boxes and option buttons.

I to not believe either of those controls have BackGround color properties to be set.
 
I to not believe either of those controls have BackGround color properties to be set.

No. But they do have the BorderColor property, which is what I'm trying to set.
 
No. But they do have the BorderColor property, which is what I'm trying to set.

I thought that is what you could not get to work, so I suggested BackColor.

Never mind... I see now you never took my suggestion.
 
moishy: I've already told you that you can't set those properties and given you a workaround. And by the way, the Shadow needs some depth for it to be visible.
 
I was under the impression that your were saying that the properties could be set if the special effect is set to shadowed.
 
No, sorry for the confusion. I was just saying that you will see the colour change in the shadow but that's about it.
 

Users who are viewing this thread

Back
Top Bottom