Sub GetArtNm
If(ArtCdTxt.Text = "") Then Return
Dim Cur As Cursor
Cur = Main.SqlLt.ExecQuery("select a.id, a.art || ' ' || a.clr || ' ' || a.sz as art, a.prc from m_art a where a.unt = 'PSG' and a.id = " & ArtCdTxt.Text)
If(Cur.RowCount = 0) Then
MsgBox("Art not found!","")
ArtCdTxt.RequestFocus
ArtCdTxt.SelectAll
ArtLbl.Text = ""
Cur.Close
Return
End If
For i = 0 To Cur.RowCount - 1
Cur.Position = i
ArtLbl.Text = Cur.GetString("art")
HrgTxt.Text = NumberFormat2(Cur.GetInt("prc"),0,0,0,True)
ArtId = Cur.GetInt("id")
Next
Cur.Close
If(QtyTxt.Text = "") Then QtyTxt.Text = 1
End Sub