If..Then to Select Case

T

Tom Ventouris

I am using If to set the value of a field:

If (Mid([ID Number], 7, 4)) > 5000 Then
Me![Field]= "X"
End if

I need to add 4 arguments but cannot figure out the "Select Case" equivalent.
Any help will be appreciated.
 
T

tina

is this what you're after?

Select Case Mid([ID Number], 7, 4)
Case > 5000
Me!FieldName = "X"
Case <something else>
<do something else>
Case Else
<do this when none of the cases apply>
End Select

hth
 
T

Tom Ventouris

Yes, thank you. This was it.

tina said:
is this what you're after?

Select Case Mid([ID Number], 7, 4)
Case > 5000
Me!FieldName = "X"
Case <something else>
<do something else>
Case Else
<do this when none of the cases apply>
End Select

hth


Tom Ventouris said:
I am using If to set the value of a field:

If (Mid([ID Number], 7, 4)) > 5000 Then
Me![Field]= "X"
End if

I need to add 4 arguments but cannot figure out the "Select Case" equivalent.
Any help will be appreciated.
 
T

tina

you're welcome :)


Tom Ventouris said:
Yes, thank you. This was it.

tina said:
is this what you're after?

Select Case Mid([ID Number], 7, 4)
Case > 5000
Me!FieldName = "X"
Case <something else>
<do something else>
Case Else
<do this when none of the cases apply>
End Select

hth


I am using If to set the value of a field:

If (Mid([ID Number], 7, 4)) > 5000 Then
Me![Field]= "X"
End if

I need to add 4 arguments but cannot figure out the "Select Case" equivalent.
Any help will be appreciated.
 
Top