create auto number field in task form

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
 
J

Joel Allen

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
 
D

Diana

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" !
 
J

Joel Allen

Try this:


Function Item_Open()

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

End Function


Joel
 
D

Diana

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




.
 

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

Top