I've done programs to save values to a dbase from a certain control, but done one by one.
Scenario:
- There are 7 textboxes where values are entered.
- There are also 7 rows (but in one column only) for each values when save button is clicked.
Problem:
- How to save values from each textbox to their respective rows based on a category (i.e. gender or ID number) ?
Here's my code - so far
.Open "Select * from Tabulation where Gender = " & lblmale.Caption, db, adOpenKeyset, adLockPessimistic
.AddNew
.Fields("Jeans_M").Value = txtm1.Text
.Fields("Jeans_M").Value = txtm2.Text
.Update
MsgBox "Data successfully save.", vbInformation, "Information"
.Close
But honestly, this would just put the values from the 2 textboxes in a random row on the Jeans_M column.
Code snippets will do just fine (but better with explanation)
Thanks.