datecode Follow

Marco van Beek

I'm using a date code with a VB scrit

              NewValue = DateAdd("d", 6, Format.NamedSubStrings("Datumcode1").Value)

This is working correctly when the month have 31 days. 

Septembre has 30 day's and now the script is not working correctly. When it is Octobre the calculatie is working correctly.

Is their somebody who can sove this problem?


Pete Thane
Comment actions Permalink

Not 100% sure but I wonder if this is due to the time (in the printing process) that the VB is being run. 

Depending where the data for Datumcode1 is coming from, try amending the script to an Event Controlled Script routine and either an OnNewRecord or OnPostPrompt if the data comes from a database or Data Entry screen respectively

Please sign in to leave a comment.