R
Raul Sousa
I have this code:
If [TDocumento] = 1 Then
DocID = "VD" & Year(DataF)
varMax = DMax("DocID", "FacturaVenda", "DocID like """ & DocID & "*""")
varMax = Val(Nz(Mid(varMax, 7), 0)) + 1
my database arrived at DocID VD2008999. Then, with this code, it created
DocID VD20081000.
The problem is that, Now DocID is not increasing because the Dmax Function
is always returning VD2008999. For this function VD2008999 > VD20081000.
How can I solve this situation?
If [TDocumento] = 1 Then
DocID = "VD" & Year(DataF)
varMax = DMax("DocID", "FacturaVenda", "DocID like """ & DocID & "*""")
varMax = Val(Nz(Mid(varMax, 7), 0)) + 1
my database arrived at DocID VD2008999. Then, with this code, it created
DocID VD20081000.
The problem is that, Now DocID is not increasing because the Dmax Function
is always returning VD2008999. For this function VD2008999 > VD20081000.
How can I solve this situation?