sorry, me again... just to know if it can be done.

emanuele

the old good fellow Bill
Local time
Today, 14:17
Joined
Jan 23, 2003
Messages
23
I am still working on this... take a look at the help I previously got.... Now the question is: Is it possible to get a notice in form of message box everytime the value in Me!status changes?
Please, in case you think that this is not possible can you let me know so I stop trying and I can go fishing instead..
Thank you all.


http://www.access-programmers.co.uk/forums/showthread.php?s=&threadid=41472


http://www.access-programmers.co.uk/forums/attachment.php?s=&postid=142270
 
Last edited:
Try the attached DB, in which I have added the following code in the AfterUpdate event of the Points text box on the subform:-

------------------------------
Private Sub points_AfterUpdate()

Dim lTotal As Long
Dim sStatus As String

Me.Parent!total.SetFocus
Me.Parent!total.Requery

lTotal = Me.Parent!total
Me.Parent!status.SetFocus
sStatus = Me.Parent!status.Text

If lTotal >= 50 Then
If sStatus <> "Gold" Then
Me.Parent!status.Text = "Gold"
MsgBox "Status changed from " & sStatus & " to Gold"
End If
ElseIf lTotal >= 20 Then
If sStatus <> "Silver" Then
Me.Parent!status.Text = "Silver"
MsgBox "Status changed from " & sStatus & " to Silver"
End If
Else
If sStatus <> "Lead" Then
Me.Parent!status.Text = "Lead"
MsgBox "Status changed from " & sStatus & " to Lead"
End If
End If

Forms!members![points underformulär].SetFocus
Me.points.SetFocus

End Sub
--------------------------
 

Attachments

Thank you..

Once again I´ve got some useful help. Everytime this happen It makes me feel so happy and this is not only for the help itself, which also is helpful for writing simila future codes, but for knowing that you all people are so kind to dedicate so much effort in helping others... I whish someday to be able, me too, to help someone else with solving problems. I know for sure how it feels after trying and trying, over and over, and cannot make it work. So once again: THANK YOU!!!
Now I have to go back to work and hopefully I make it work on the real database...
 

Users who are viewing this thread

Back
Top Bottom