create auto number field in task form

  • Thread starter Thread starter Diana
  • Start date Start date
D

Diana

Hi All,

I’m trying to create a textbox field on a task form-Outlook 2003-
and every time I open the task or click on txtbox , the number in it
incremented by 1
like a serial number for the tasks.
If anyone can show me the vbscript code to do that, I’ll be grateful
 
Is it the same task? If so, make your field an integer. It will start with
0. Then in your code.....

Function Item_Open()

Item.UserProperties("YourField") = Item.UserProperties("YourField") +1

End Function
 
thx for replying Joel,.
Actually it is not the same task, i've created a new form (task), n a
textbox filed displaying "Call No" for helpdesk puposes, i want my code to
read the value (0)in this field and increments it by 1 ,becomes(1) ,then i
save the form and once i open it again incrementes by 1 becomes(2).
i've tried your code ,every time i open it displays "1" !
 
Try this:


Function Item_Open()

Item.UserProperties("YourField") = Item.UserProperties("YourField") +1
item.save

End Function


Joel
 
also did not work :(
--
Thanks
Diana


Joel Allen said:
Try this:


Function Item_Open()

Item.UserProperties("YourField") = Item.UserProperties("YourField") +1
item.save

End Function


Joel




.
 
Back
Top