A
Angus
Hi experts,
I have some experience in excel vba but a newbie in access, now i have a
access code to request users input a reason (link to reason table) when they
select air shipment mode. However the code doesn't check and show the message
as expected.
Me.txtAirReason.Value = ""
If UCase(Me.cboShipmentMode.Value) = "AIR" And IsNull(Me.txtAirReason.Value)
= True Then
MsgBox "Air shipment reason cannot be blank when Shipment Mode is AIR",
vbCritical
Me.txtAirReason.SetFocus
Exit Sub
End If
However if I change IsNull(Me.txtAirReason.Value) = False
Then it shows the message. It seems to me that there is something as a
txtAirReason value. My question:
1. I have already make txtAirReason.Value = "", why there is still
"something" inside?
2. In excel I can run the program step by step by F8, how to do the same
thing in Access, so that I can go to the code to see what is the value?
3. Anyone can help me to fix the code?
I have some experience in excel vba but a newbie in access, now i have a
access code to request users input a reason (link to reason table) when they
select air shipment mode. However the code doesn't check and show the message
as expected.
Me.txtAirReason.Value = ""
If UCase(Me.cboShipmentMode.Value) = "AIR" And IsNull(Me.txtAirReason.Value)
= True Then
MsgBox "Air shipment reason cannot be blank when Shipment Mode is AIR",
vbCritical
Me.txtAirReason.SetFocus
Exit Sub
End If
However if I change IsNull(Me.txtAirReason.Value) = False
Then it shows the message. It seems to me that there is something as a
txtAirReason value. My question:
1. I have already make txtAirReason.Value = "", why there is still
"something" inside?
2. In excel I can run the program step by step by F8, how to do the same
thing in Access, so that I can go to the code to see what is the value?
3. Anyone can help me to fix the code?