sugherello
Technical User
Hi all,
thi is my first access function and It seems to work but I need your precious support!
I use my function 'Provacondotte' into a query 'A' whitout problem...now if I call my query 'A' into query 'B' and I use group by (into query 'B') tab my function function doesn't work in query 'A'...why!
this is my code:
Option Explicit
Dim avaloredt As Long
Dim wtim As String
'Dim avaloredt As Date
Function Provacondotte(Azione As Variant, Dataaz As Variant) As Long
If Azione = "'status' changed from 'Active' to 'Waiting for customer'" Then avaloredt = Dataaz
If Azione = "'status' changed from 'Waiting for customer' to 'Active'" Then Provacondotte = avaloredt
If Azione = "'status' changed from 'Customer Action Ready' to 'Active'" Then Provacondotte = avaloredt
If Azione = "'status' changed from 'Active' to 'Alert'" Then avaloredt = Dataaz
If Azione = "'status' changed from 'Alert' to 'Active'" Then Provacondotte = avaloredt
If Azione = "'status' changed from 'Waiting for customer' to 'Active'" Then Provacondotte = avaloredt
If Azione = "'status' changed from 'Customer Action Ready' to 'Active'" Then Provacondotte = avaloredt
If Azione = "'status' changed from 'Active' to 'Escalated 3d party'" Then avaloredt = Dataaz
If Azione = "'status' changed from 'Escalated 3d party' to 'Active'" Then Provacondotte = avaloredt
If Azione = "'status' changed from 'Active' to 'Closed'" Then avaloredt = Dataaz
If Azione = "'status' changed from 'Closed' to 'Active'" Then Provacondotte = avaloredt
If Azione = "'status' changed from 'Closed' to 'Closed satisfaction verified'" Then Provacondotte = avaloredt
End Function
thi is my first access function and It seems to work but I need your precious support!
I use my function 'Provacondotte' into a query 'A' whitout problem...now if I call my query 'A' into query 'B' and I use group by (into query 'B') tab my function function doesn't work in query 'A'...why!
this is my code:
Option Explicit
Dim avaloredt As Long
Dim wtim As String
'Dim avaloredt As Date
Function Provacondotte(Azione As Variant, Dataaz As Variant) As Long
If Azione = "'status' changed from 'Active' to 'Waiting for customer'" Then avaloredt = Dataaz
If Azione = "'status' changed from 'Waiting for customer' to 'Active'" Then Provacondotte = avaloredt
If Azione = "'status' changed from 'Customer Action Ready' to 'Active'" Then Provacondotte = avaloredt
If Azione = "'status' changed from 'Active' to 'Alert'" Then avaloredt = Dataaz
If Azione = "'status' changed from 'Alert' to 'Active'" Then Provacondotte = avaloredt
If Azione = "'status' changed from 'Waiting for customer' to 'Active'" Then Provacondotte = avaloredt
If Azione = "'status' changed from 'Customer Action Ready' to 'Active'" Then Provacondotte = avaloredt
If Azione = "'status' changed from 'Active' to 'Escalated 3d party'" Then avaloredt = Dataaz
If Azione = "'status' changed from 'Escalated 3d party' to 'Active'" Then Provacondotte = avaloredt
If Azione = "'status' changed from 'Active' to 'Closed'" Then avaloredt = Dataaz
If Azione = "'status' changed from 'Closed' to 'Active'" Then Provacondotte = avaloredt
If Azione = "'status' changed from 'Closed' to 'Closed satisfaction verified'" Then Provacondotte = avaloredt
End Function