So I'm confused by this and I'm probably doing something stupid but I'm stumped. I have a custom function:
Code:
Public Function chemid_infield(SampleID As Integer, chkfield As String) As Boolean
Dim chkstring As String, fieldstr As String
chkstring = "r." & CStr(SampleID)
If InStr(1, CStr(chkfield), chkstring) Then
chemid_infield = True
Else
chemid_infield = False
End If
End Function
which just checks if a string is in another string and returns true if so and I want to use this as a criteria to return only specific values. I run the query and it looks like it is working, I'm not getting errors, the function goes through each record and returns true when it comes upon a string that has the search string in it. But the resulting table is empty.
Here is the sql query:
Code:
SELECT Plates.PlateID, Plates.Reagents FROM Plates
WHERE ((chemid_infield(12,[Plates].[Reagents])="True"));