Hi!
Is there a way to bind a label with a value obtained from a table(in its caption)
I'm using a datacombo that displays companies name and i need two values of the row, but I can obtain only the two values of the first row.
I need the two values to generate an Id, code:
sig = DataCombo1.BoundText
sMonth = Format(Now, "mm"
sYear = Format(Now, "yy"
If Val(Label3.Caption) <> Val(sMonth) Then
Label2.Caption = 1
Label3.Caption = Val(sMonth)
End If
If Val(Label2.Caption) < 10 Then
txtID.Text = sig + "6" + "00" + Label2.Caption + sMonth + sYear + "6"
ElseIf Val(Label1.Caption) >= 10 Then
txtID.Text = sig + "6" + "0" + Label2.Caption + sMonth + sYear + "6"
End If
Label2.Caption = Val(Label2.Caption) + 1
AdCompany.Recordset.Update
Any hint??
Is there a way to bind a label with a value obtained from a table(in its caption)
I'm using a datacombo that displays companies name and i need two values of the row, but I can obtain only the two values of the first row.
I need the two values to generate an Id, code:
sig = DataCombo1.BoundText
sMonth = Format(Now, "mm"
sYear = Format(Now, "yy"
If Val(Label3.Caption) <> Val(sMonth) Then
Label2.Caption = 1
Label3.Caption = Val(sMonth)
End If
If Val(Label2.Caption) < 10 Then
txtID.Text = sig + "6" + "00" + Label2.Caption + sMonth + sYear + "6"
ElseIf Val(Label1.Caption) >= 10 Then
txtID.Text = sig + "6" + "0" + Label2.Caption + sMonth + sYear + "6"
End If
Label2.Caption = Val(Label2.Caption) + 1
AdCompany.Recordset.Update
Any hint??