Set dbInvoice = New Connection
dbInvoice.CursorLocation = adUseClient
dbInvoice.Open "PROVIDER=MSDASQL;dsn=SCLSystem;uid=anodising;pwd=xxxxx;database=SCLSystemSQL;"
Set adoInvoiceRS = New Recordset
adoInvoiceRS.Open "SELECT * FROM tblInvRegister", dbInvoice, adOpenStatic, adLockOptimistic
intRecs = adoInvoiceRS.RecordCount
adoInvoiceRS.MoveLast
With adoInvoiceRS
.AddNew
|