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.
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
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