It did not exactly what I wanted so I changed the approach and did this.... Now it works great: Maybe someone can benefit from it aswell..
Dim A, B, C
A = DMax("[ID]", "Issues")
B = DMax("[ID]", "T_Request")
If IsNull(A) Then A = 0
If IsNull(B) Then B = 0
If A > B Then
C = A + 1
Else
C = B + 1
End If
Me.ID = C
|