Tabliz Editing Records


The Editing List

The Editing List is a paginated table of the records in your recordset with buttons to edit or delete them. You can get an editing list using the DoEditingList method like this:

dim TBLZ
Set TBLZ = Server.CreateObject("Tabliz.AdminRecordset")
TBLZ.DatabasePath = "C:\MyPath\MyAccessDB.mdb"
TBLZ.recordset = "TheTable"
TBLZ.DoEditingList

The DoEditingList method features an optional parameter useful to filter the records you want to be in the Editing List:

TBLZ.DoEditingList "WHERE MYFIELD=MYPARAMETER"

Changing the properties of the EditingList Object before to call the DoEditingList method allows you to customize your Editing List.

For example you can disable the Delete button:

TBLZ.EditingList.AllowDelete = false

Or you can set the page size to 10 records per page:

TBLZ.EditingList.PageSize = 10

By default the Editing List is generated also after a search is performed on the recordset using the DoSearchForm method. See TaBliz Searching for more information on this topic.

EditItem Method

EditItem method is usefull when you want to edit a record of a given Database without to use the EditingList.

Here is one example:

dim TBLZ
Set TBLZ = Server.CreateObject("Tabliz.AdminRecordset")
TBLZ.DatabasePath = "C:\MyPath\MyAccessDB.mdb"
TBLZ.recordset = "TheTable"
TBLZ.EditItem "WHERE MYFIELD=MYPARAMETER”

Note: You can build dynamically the where criterion via ASP code. In this way you can, for example, program an ASP page so that the edited record will depend on the ASP Request.

Here is how:

dim param
param=Request(“parameter”)
Set TBLZ = Server.CreateObject("Tabliz.AdminRecordset")
TBLZ.DatabasePath = "C:\MyPath\MyAccessDB.mdb"
TBLZ.recordset = "TheTable"
TBLZ.EditItem "WHERE MYFIELD=" & param

DeleteItem

DeleteItem method is similar to the EditItem and is usefull to delete a given record without to use the EditingList.

Here is a sample:

dim TBLZ
Set TBLZ = Server.CreateObject("Tabliz.AdminRecordset")
TBLZ.DatabasePath = "C:\MyPath\MyAccessDB.mdb"
TBLZ.recordset = "TheTable"
TBLZ.DeleteItem "WHERE MYPARAMETER=MYCRITERION"