Try this: ret_val = accounts_receivable_module.nSelectBatch("T" & Right("0" & Now.Month, 2) & Right("0" & Now.Day, 2)) ret_val = accounts_receivable_module.nGetNextInvoiceNo(invoice_number) ret_val = accounts_receivable_module.nSetValue("InvoiceNo$", invoice_number) ret_val = accounts_receivable_module.nSetValue("InvoiceType$", "IN") ret_val = accounts_receivable_module.nSetKey() ... set other fields, no need to set BatchNo$ again, then add line
↧