Code not working

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I’m trying to update the coding for a report. I am having problems with the
coding on the form. I have it broken down by certain criteria and they are
all working, but one and I can seem to figure this one out. It looking up a
number field and I am using the following syntax:

If Me!SpecificResultCode = "All" Then
If stLinkCriteria <> "" Then stLinkCriteria = stLinkCriteria & " and "
stLinkCriteria = stLinkCriteria & "[dbo_rescodes.ResultCode] = " & ""
& (Trim(Me!SpecificResultCode)) & ""
End If

Thanks.
 
From what I understand, you need to change the first line to

If Me!SpecificResultCode <> "All" Then

HTH
 
Thanks, i got it.

If Me!ChooseResultCode = True Then
If stLinkCriteria <> "" Then stLinkCriteria = stLinkCriteria & " and "
stLinkCriteria = stLinkCriteria & "[dbo_customers.QuitCode] = " &
((Str(Trim(Me![SpecificResultCode]))))
End If

Sergey Poberezovskiy said:
From what I understand, you need to change the first line to

If Me!SpecificResultCode <> "All" Then

HTH
KSIMMSA said:
I’m trying to update the coding for a report. I am having problems with the
coding on the form. I have it broken down by certain criteria and they are
all working, but one and I can seem to figure this one out. It looking up a
number field and I am using the following syntax:

If Me!SpecificResultCode = "All" Then
If stLinkCriteria <> "" Then stLinkCriteria = stLinkCriteria & " and "
stLinkCriteria = stLinkCriteria & "[dbo_rescodes.ResultCode] = " & ""
& (Trim(Me!SpecificResultCode)) & ""
End If

Thanks.
 
Back
Top