Change background

J

Joel

Hello,

I have a Task form I use in the All Public Folders area.
My goal: If I open form, background is normal. If I open form and sombody
else is in it, then make background red.

I tried this code and it doesn't work. When the second person opens it, it
doesn't know that Forrmopen = 1

'-----------------
Dim ForrmOpen
'-----------------

'-----------------
Function Item_Open()

if ForrmOpen = 1 then
Set ins = Item.GetInspector
Set pgs = ins.ModifiedFormPages
Set pg = pgs("PM")
Set ctls = pg.Controls
Set ctl1 = ctls("1_New_Order")
Set ctl2 = ctls("Frame23")
Set ctl3 = ctls("Frame19")
ctl1.BackColor = vbred
ctl2.BackColor = vbred
ctl3.BackColor = vbred
end if

if ForrmOpen = 0 then
ForrmOpen = 1
end if

End Function
'-----------------


'-----------------
Function Item_Close()

if ForrmOpen = 1 then
ForrmOpen = 0
end if

End Function
'-----------------
 
S

Sue Mosher [MVP-Outlook]

You need to set a property on the item, and save the item, then check the
value of that property when the item opens. Don't forget to reset the
property value when the original opener closes it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Please help with Function Item_Open() 1
Outlook 2003 Bug? 0
corupting code 2
read only 1
summing variables 2
Optional Arguments in Sub Procedure 14
Multi Select List Not Working 1
Help with MultiSelect ListBox 0

Top