Change Pic on New Record

Psychobabble

Registered User.
Local time
Today, 08:33
Joined
Apr 26, 2003
Messages
13
I want an identifying picture at the top of my form which changes depending on the value of a list field. An example is this:

If Status.Value = "leading" Then
imgPlus.picture = "c:\...plus.bmp"
ElseIf Status.Value = "cautionary" Then
imgPlus.picture = "c:\...question.bmp"
End If

The script works fine but I can't find a way to have it execute every time a new record is selected on the form. I've tried putting the script in load, open, after update, data change and data set change but I can only get it to work if I put it under click and click the form. Any ideas?

Thanks
 
you can put your code in the form's Current event.
Code:
If Me.NewRecord Then
' here comes your code
End If
 
Thanks for the answer. It's almost what I was looking for but not quite. I was talking about when browsing the current records, I have all my data in there already, I want this picture to display for records which are already entered into the form.

So instead of ".NewRecord" ise there's something like ".OpenNewRecord"?
 
Lol, figured it out, I don't need any if clause there, I can just put the code in the current event section... Thanks!
 

Users who are viewing this thread

Back
Top Bottom