I have a problem in updating my textfields in the table I posted in my form. For example for my inventory system, I want the QUANTITY of my products to CHANGE its value everytime SALES are performed. Hope you guys can help. THANK YOU SO MUCH.

How you define "SALES are performed" - is that via someone filling in a form and clicking a button?

Have you followed a VB6 course anywhere?

Dim gobjConn As ADODB.Connection
    Set gobjConn = New ADODB.Connection

    gobjConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" _
                & "Data Source=" _
                & GetAppPath _
                & "path and filename.mdb"
    Dim rAdd As ADODB.Recordset
    Set rAdd = New ADODB.Recordset
    rAdd.Open "inventory", gobjConn, adOpenDynamic, adLockPessimistic

now this is how you connect
when connected you search the item which is being sold then you filter that in the database

if new entery then use the following one line

rAdd.addnew

if only updading the existing then dont use rAdd.addnew

Dim lv2Item as string
lv2Item = item number or item code or item name what ever you want
rAdd.Filter = "ID='" & lv2Item & "'"

here ID is name of Field in the table of a database file in ms access you replace it with item code or item name table of the item being sold or what ever you what to do. now that table is parked on the item which info has to be changed
now you read the quinty and then add or subtract and put back the answer in the fiels like this

rAdd!QUANTITY = the answer
rAdd.update
rAdd.movenext

hope this helps

You will need to add one data and then go to properties window look at the pictures... d.JPGp.JPG
no you have to select Connect: access, and DatabaseName: the path of your database. Thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.