Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.
'Class mudule Public Function Merged(ProCode As String) As String Dim Merge(1 To 2) As String Dim rs As ADODB.Recordset Set rs = New ADODB.Recordset Dim sql As String Set rs = New ADODB.Recordset sql = "select Top 1 Tag_Name, Quantity from STOCK where PROCODE='" & ProCode & "'" rs.LockType = adLockOptimistic rs.CursorType = adOpenKeyset rs.Open sql, cn With rs If .BOF = True And _ .EOF = True Then Merge(1) = "" Merge(2) = (0) Else Merge(1) = !Tag_Name & "" Merge(2) = !Quantity End If .Close End With Set rs = Nothing End Function 'Form Public Sub Tag1() Dim s As Labeler Set s = New Labeler s.OPEN_CON "mydb", "" Dim j As SSCommand For Each j In cmd1 j.Caption = s.Merge(1)(j.Index) & vbNewLine & s.Merge(2)(j.Index) Next s.CLOSE_CON Set s = Nothing End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.