Saviolin
New member
- Local time
- Today, 00:15
- Joined
- Oct 13, 2021
- Messages
- 9
Hello Everybody!
I'm am getting this error "Runtime 2427 You entered an expression that has no value."
I've tried others solutions, that it brought other errors (2447 / 424 / 13)
It is a Form with an Input Box, you type a value number and then it check this in a Query. If the "value number" exists in the Table, everything it's fine, the VBA code runs, and the Form it is show in a perfectly way. But if the value number doesn't exist in the Table, so it´s a null value, and here its the trouble.
I want that in case the value number is null, the Form will show a text like " The Input Code doesn´t Exist", or something like that.
This is the VBA code:
Any idea how to solve this problem?
Thanks!
I'm am getting this error "Runtime 2427 You entered an expression that has no value."
I've tried others solutions, that it brought other errors (2447 / 424 / 13)
It is a Form with an Input Box, you type a value number and then it check this in a Query. If the "value number" exists in the Table, everything it's fine, the VBA code runs, and the Form it is show in a perfectly way. But if the value number doesn't exist in the Table, so it´s a null value, and here its the trouble.
I want that in case the value number is null, the Form will show a text like " The Input Code doesn´t Exist", or something like that.
This is the VBA code:
Code:
Private Sub Form_Load()
Form_Prueba3Form.lblinfo.Caption = ""
Me.Prod.SetFocus
If IsNull(Me.Prod) Then
Me.lblinfo.Caption = "El código buscado no existe."
Else
Me.lblinfo.Caption = [Prod]
End If
End Sub
Any idea how to solve this problem?
Thanks!