Hi, To avoid duplicate invoice number you can add a customization like this. Just add the APDoc.dh file and paste this code. Private Sub cinvcnbr_Chk(ChkStrg As String, retval As Integer) serr1 = SqlFetch1(c1, "SELECT * FROM APDoc WHERE InvcNbr =" & SParm(ChkStrg), bAPDoc, LenB(bAPDoc)) If serr1 = 0 Then Call MessBox("Can't duplicate the nvoice number", MB_ICONEXCLAMATION, Form1.Caption) retval = ErrNoMess End If End Sub
↧