Dylan Snyder
Registered User.
- Local time
- Today, 05:37
- Joined
- Dec 31, 2007
- Messages
- 89
does somebody know of a good tutorial on conditional statments in VBA? Some times I write them and they work. Other times, they just run as though the condition is always true, no matter if it is or not. Does anyone know of a good tutorial or can provide me with a "lighbulb" reason for why the below code does not work? Thanks
If Me.UPC_Number Like "************" Then
Me.UPC_Type = "UPC"
ElseIf Me.UPC_Number Like "*************" Then
Me.UPC_Type = "EAN"
Else
MsgBox "UPC Number must contain either 12 or 13 digits."
End If
If Me.UPC_Number Like "************" Then
Me.UPC_Type = "UPC"
ElseIf Me.UPC_Number Like "*************" Then
Me.UPC_Type = "EAN"
Else
MsgBox "UPC Number must contain either 12 or 13 digits."
End If