if then statement within form

rheide

Registered User.
Local time
Today, 01:22
Joined
Jun 12, 2002
Messages
32
I currently have the following code in my form:

Private Sub prname_AfterUpdate()
Me.PRACT_ = DLookup("[LNACT#]", "tblPCSLicensees", "[LNNAME] ='" & [PRNAME] & "'")

If Me.PRACT_ Like "1001" Then
RO = "O"
ElseIf Me.PRACT_ Like "1003" Then
RO = "O"
ElseIf Me.PRACT_ Like "1006" Then
RO = "O"
ElseIf Me.PRACT_ Like "1182" Then
RO = "O"
Else
RO = "R"
End If
End Sub

I would like it to be the same except I want it to do the following:

If Me.PRACT_ is like any record in my table, tblCoNames, field: pciaact then
RO = "O"
Else
RO = "R"
End if

I have a feeling it has to do with an array (which I don't know much about).

Thanks for any suggestions,
Randy
 

Users who are viewing this thread

Back
Top Bottom