If statement and font color change

Soegstad

Registered User.
Local time
Today, 13:58
Joined
Dec 3, 2003
Messages
53
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
 
You will need to create a Popup/Modal form with a Rich-Text Box control to handle this type of message formating.
 
Thanks for your reply travis.
Is a newbie to access programming I was hoping you could tell me how to do something like this:)
Thanks again
Mads
 

Users who are viewing this thread

Back
Top Bottom