Shawn Pelletier 7.Dec.11 01:21 PM a Web browser Applications Development6.5.5Windows XP
Hi,
I've got a great piece of working code here, however, when I change the values of the array and run a form against it, it fails.
There's more code inbetween the array statement and the Forall statement, however, to save space I don't believe it is needed here as I have used the debugger to try to locate the problem and it seems to be working fine for the code in between (it grabs the correct values....etc).
When I use the following array statement this runs fine:
Dim GenRoutine As Variant
GenRoutine=Split("PF00A,PFDGAB,PFDGAC,PFDGAE,PFDGAG,PFDGAI,PFDGAO,PFDGBB,PFDGBD,PFDGCA,PFDGCE,PFDGGA,PFDGEA,PFDGEG",",")
When I use this array statement it doesn't run:
Dim GenRoutine As Variant
GenRoutine = Split("H1052,H5022",",")
'Send email message
Forall GenValue In Routine.Values
If Not Isnull(Arraygetindex(GenRoutine, GenValue)) Then <=================Code runs fine until it gets here and then jumps to "Exit Forall"
'This line sends the email
Call AdviseDoc.Send( False, "xxxxxx@xxxxxx.com")
Exit Forall
End If
End Forall
I'm testing with documents that do contain the values I'm looking for. It does not give me an error message either. Any help would be appreciated and if need be I can post all the code. It looks to me like it's not fullfilling the "If Not IsNull" statement, but I don't know why.