Hi everyone
I have a code that shows a message if the user tries to register 2 of the same products within one order. The code is:
Private Sub Typebetegnelse_AfterUpdate()
Dim IsThere As Variant
IsThere = DLookup("[PID]", _
"tblKalkyleSub", _
"[KalkyleID] = " & Me.KalkyleID & " And " & _
"[PID] = '" & Me.PID & "'")
If Not IsNull(IsThere) Then
MsgBox ("You already have this product"), (vbCritical), ("Error")
End If
End Sub
What I also want to do is to have the text (of the product) within the order to change to red.
Thanks alot
Mads
I have a code that shows a message if the user tries to register 2 of the same products within one order. The code is:
Private Sub Typebetegnelse_AfterUpdate()
Dim IsThere As Variant
IsThere = DLookup("[PID]", _
"tblKalkyleSub", _
"[KalkyleID] = " & Me.KalkyleID & " And " & _
"[PID] = '" & Me.PID & "'")
If Not IsNull(IsThere) Then
MsgBox ("You already have this product"), (vbCritical), ("Error")
End If
End Sub
What I also want to do is to have the text (of the product) within the order to change to red.
Thanks alot
Mads