I'm trying to pull records from a table (with join) where a text field PassFail must not = PASS not be null/empty but I'm struggling with the syntax. The errors I have had so far point to the syntax I'm using is not supported by linq..
My latest attempt is
Dim HW2Process = (From mi In dc.tblMainDatas
Join u In dc.tblUsers On u.UserNo Equals mi.RecdBy
Join fi In dc.tblHWs On fi.HWRef Equals mi.HWRef
Where mi.Ref.StartsWith(tb_HWRefFind.Text.Trim()) And mi.DateProcessed.HasValue = True And ((mi.PassFail <> "PASS") And (IsNothing(mi.PassFail) = False))
Select New With {.ID = mi.ID,
.DateReceived = mi.DateRecd,
.ReceivedBy = u.FullName,
.SerialID = mi.SerialID,
.LiveTest = mi.LiveTest,
.DeployYear = mi. DeployYear,
.ProductType = mi.ProductType,
.HWRef = mi.HWRef,
.HWName = fi.HWName,
.MediaType = mi.MediaType,
.MediaQuantity = mi.MediaQty})
The criteria should be that mi.PassFail should not be null or empty or equal 'PASS'
Any help appreciated.