Link to home
Start Free TrialLog in
Avatar of jvantassel1
jvantassel1Flag for United States of America

asked on

Select case

I'm trying to use a case statement in MS Access adp to produce an error if the value is any number other than 4,5,6,7,8
Here's what I was trying, but it doesn't work.

Any help is appreciated.

Select Case Me.cboDescriptionType
            Case Not 4 - 8
                Me.lblError_NotUpdateable.Visible = True
                boolError = True
        End Select
Avatar of jvantassel1
jvantassel1
Flag of United States of America image

ASKER

conducting some error checking.  I need to make sure the value isn't 4,5,6,7,8.
Here's the code that doesn't work.

Select Case Me.cboDescriptionType
            Case Not 4 - 8
                Me.lblError_NotUpdateable.Visible = True
                boolError = True
        End Select
ASKER CERTIFIED SOLUTION
Avatar of jacob_miw
jacob_miw

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jez Walters
Personally, I think it makes code clearer to drop the "Me." prefix - you don't need it.