hindersaliva
asked on
Access 2016 - Blank, Null, or empty string?
I'm running this on an Access 2016 database. (via ADO from Excel)
It should update the field RefCheck1Status when the WHERE is not 'Success'.
I'm finding this!
It works as it should when the field has 'Success' in it.
BUT the WHERE seems to return FALSE when the field has nothing in it - ie. when a new record has been created.
(I am expecting <> 'Success' to include when the field is blank)
Any help please?
Thanks
I have tried these ...
AND tblManualData.RefCheck1Sta tus Is Null
AND tblManualData.RefCheck1Sta tus = ''
AND tblManualData.RefCheck1Sta tus LIKE ''
sSQL = "Update qryUpdateAlwaysButWithExceptions "
sSQL = sSQL + "Set tblManualData.RefCheck1Status = tblTracImport.RefCheck1Status "
sSQL = sSQL + "WHERE tblManualData.RefCheck1Status <> 'Success'"
It should update the field RefCheck1Status when the WHERE is not 'Success'.
I'm finding this!
It works as it should when the field has 'Success' in it.
BUT the WHERE seems to return FALSE when the field has nothing in it - ie. when a new record has been created.
(I am expecting <> 'Success' to include when the field is blank)
Any help please?
Thanks
I have tried these ...
AND tblManualData.RefCheck1Sta
AND tblManualData.RefCheck1Sta
AND tblManualData.RefCheck1Sta
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sorry. I should have mentioned that the query is already setup in Access. It joins the two tables.
@hindersaliva,
I've never seen a query of any kind in Access where you can reference the individual tables that contribute to a saved query.
I've never seen a query of any kind in Access where you can reference the individual tables that contribute to a saved query.
ASKER
Hi Dale. It is possible cos it works. Except, there's the problem I'm trying to solve.
did you try the post from http:#a41981227 ?
ASKER
Ray and Pat, OMG I'm such an idiot!!!!
I had AND instead of OR.
So, Is Null works as it should.
Thanks all.
I had AND instead of OR.
So, Is Null works as it should.
Thanks all.
YOu have not referenced tblManualData or tblTracImport in a FROM clause in the query.