Hi,
I would like to make a listbox that on double click will delete the concerning record.
.
This works fine for records with both a value for [FoodEx1_hier_cd] and for [Ingredient], but it does not work for records with a Null value for [Ingredient].
THis is the code:
The error I get is:
Run-time error 3075: Syntax error in string expression 'FoodEx1_hier_cd LIKE 'A.04.02' AND (Me.List53.Column(1) Is NULL Or Me.List53.Column(1) Like '');'.
Has anybody any idea why this does not delete the records with Null values (or value '')?
Thank you in advance!
Tep
I would like to make a listbox that on double click will delete the concerning record.

This works fine for records with both a value for [FoodEx1_hier_cd] and for [Ingredient], but it does not work for records with a Null value for [Ingredient].
THis is the code:
Code:
If IsNull(Me.List53.Column(1)) = False Then
CurrentDb.Execute "DELETE * FROM [FoodComposition FE1] WHERE FoodEx1_hier_cd LIKE '" & Me.List53.Column(0) & "' AND Ingredient LIKE '" & Me.List53.Column(1) & "';"
End If
If IsNull(Me.List53.Column(1)) = True Or (Me.List53.Column(1)) Like "" Then
CurrentDb.Execute "DELETE * FROM [FoodComposition FE1] WHERE FoodEx1_hier_cd LIKE '" & Me.List53.Column(0) & "' AND (Me.List53.Column(1) IS NULL Or Me.List53.Column(1) Like "");"
End If
Me.List53.Requery
Run-time error 3075: Syntax error in string expression 'FoodEx1_hier_cd LIKE 'A.04.02' AND (Me.List53.Column(1) Is NULL Or Me.List53.Column(1) Like '');'.
Has anybody any idea why this does not delete the records with Null values (or value '')?

Thank you in advance!
Tep