Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.
Public Sub save_Collections(cn As ADODB.Connection, lpMyDoc As String, ACCTID As String, _ Amount As Double, UsrName As String, CustName As String) Call OPEN_CON(cn, "DBSALES", "Winpos") Dim rs As ADODB.Recordset Dim sql As String Set rs = New ADODB.Recordset sql = "select * from Collect where Docno='" & lpMyDoc & "'" rs.LockType = adLockOptimistic rs.CursorType = adOpenKeyset rs.Open sql, cn With rs If .BOF = True And _ .EOF = True Then .AddNew !docno = lpMyDoc End If !ACCTID = !ACCTID !Amount = !Amount - Amount !uname = !uname !Cust_Name = !Cust_Name .Update .Close End With Set rs = Nothing Set cn = Nothing End Sub Public Sub SaveCollections() Dim cn As ADODB.Connection Call OPEN_CON(cn, "dbsales", "Winpos") Call save_Collections(cn, CustomerID.text, 0, txtAmount.text, 0, 0) End If Set cn = Nothing MsgBox "Done !!!", vbconfirm, "confirm" End Sub
|how to read a csv file and change the delivery date where needed||19||52|
|VB6 add a minute to the date time value||8||33|
|Excel Vlookup to move data back to source.||4||64|
|Windows 10 start screen issues||9||39|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
16 Experts available now in Live!