Logical Problem - quick/easy to solve

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

Well and quick/easy to solve for you. I can't think or
understand how to do this.

A variable is called 'newage' representing a persons age

I have an age group for 21 to 25 Yr Olds. I want an if
stagement saying if 'newage' is not in between 21 and 25
then msgbox "False"

So far I have (that doesnt work):

If Me![AgeGroup] = "21-25" And Not newage > 20 And Not
newage < 25 Then MsgBox "You Cannot Enter This Person
Into This Event As The Entrant Is " & newage & " Years
Old And This Event Is For Entrants Between The Ages Of 21
To 25"
 
If [AgeGroup] <> "21-25" Then
Exit Sub
End If

If newage < 21 or newage > 25 then
MsgBox "You Cannot Enter This Person " _
& "Into This Event As The Entrant Is " _
& newage & " Years Old And This Event " _
& "Is For Entrants Between The Ages " _
& "Of 21 To 25."
End If

Hope this helps!

Howard Brody
 
Back
Top