Possible to populate the HFG?

Discussions related to our free online utilities, such as free qr code maker and online barcode generator. Free utilities such as pdf417decode are also supported here.

Possible to populate the HFG?

Postby leynie (legacy member) on Sun Aug 28, 2005 9:22 am

Hi all,

I am working on a program where once a barcode is scanned the relevant details of the product would be extracted from the database and displayed on the HFG (hierachical flexgrid). The problem is, only one product item data is displayed on the HFG everytime an item is scanned but i wish to keep the previous scanned product data on the HFG when scanning for the second item. Any idea on how i can do it? the following are the code snippet:

Code: Select all
Private Sub Form_KeyPress(KeyAscii As Integer)
    If KeyAscii = 126 Then
        'Reset the KeyAscii to 0
        KeyAscii = 0
       
        ScannedData.Text = InputBox("Barcode Read:")
       
        Dim sql As String
        sql = "select * from book where barcode like '" & ScannedData.Text & "%'"
        adcBook.RecordSource = sql
        adcBook.CommandType = adCmdText
        adcBook.Refresh
        Set grdBook.DataSource = adcBook
   
    End If
End Sub



Would appreciate as well if anyone could tell me if i am doing it correctly or how i could improve on it.

Thanks in advance!

cheers,
leynie
leynie (legacy member)
 

Return to Online Utilities and Free Programs

Who is online

Users browsing this forum: No registered users and 1 guest