Ho do I check null value in a column of a ComboBox?
Hi I have code that works well when Me.Kombinationsruta145.Column(8) contains a value. But if the value in column (8) is Null, my If clause doesnt trap it. The second part of the "If", after Else is always performed.
How can I stop the code and give the user a message when Me.Kombinationsruta145.Column(8) has a Null value?
I receive this error in line 190 Error 13 (Type mismatch) in procedure Kombinationsruta145_AfterUpdate,line 190
Dim RecipeInChoosen As Long Dim RecipeInTank As Long140 If (IsNull(Me.Kombinationsruta145.Column(8))) Then 'Debug.Print Me.Kombinationsruta145.Column(8) & "column 8"150 DoCmd.OpenForm "WarningOrNoteGeneric"160 Forms!WarningOrNoteGeneric.TheMessage = "There is no recipe linked to this product in Article Index. Please close Filling Records and update Article index."170 Exit Sub180 Else190 RecipeInChoosen = Me.Kombinationsruta145.Column(8)200 RecipeInTank = Forms![bryggning tappning från lagertank]![Tappning Ingående batcher i en överföring underformulär].Form![recept] 'Debug.Print RecipeInChoosen & "In choosen" 'Debug.Print RecipeInTank & "In Tank"210 End If