1. if you reach the last record, issue the command
data1.recordset.addnew
2. then set the focus to the first textbox
3. type in the values for each text box
4. for the last text box, it's lost focus function should
contain the command
data1.recordset.update
When you create textboxes, make sure you specify the
datasource and the data field for each.
e.g.
name : txtidno
datasource : data1
datafield : idno
to add :
with data1.recordset
.addnew
.idno = txtidno.text
' insert the other fields if there are other fields...
* when add mode
with thisform
store .f. to .btnadd.enabled, .btnedit.enabled,;
.btndelete.enabled, .btnnext.enabled,;
.btn .... etc.
end with
* to update or cancel
with thisform
store .t. to .btnadd.enabled, .btnedit.enabled,;
.btndelete.enabled...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.