Binding Recordset Methods
ValidateForm
it Validate your form to assure that all required fields are not empty
Syntax:
Function ValidateForm(ByRef dm_Form As System.Windows.Forms.Form) As Boolean
Note:
it return true if all required fields are not empty , otherwise it returns false
Example:
you may add this code in your form_Load event
DM.RequiredFields("Order_ID+Order_Date)
and now add this code in your OK button (Save data)
If Not DM.ValidateForm(Me) Then Exit Sub
KeyFields
it assigns the fields in your Recordset which not allowed to duplicate
Syntax:
Function KeyFields(ByVal str_KeyFields As String)
Note:
multi fields can concatenated by plus sign '+'
Example:
DM.KeyFields("Flag+OrderId")
KeyLeaveField
it assigns the fields in your Recordset which will retieve new data when focus chang away from it
Syntax:
Function KeyLeaveField(ByRef dm_MasterTable As ADODB.Recordset, ByVal str_KeyLeaveField As String, Optional ByVal n_ZeroPad As Byte = 0)

Note:
n_ZeroPad parameter padding data with "0" character
this mean that '34' with n_ZeroPad is 4 will be '0034'
this is useful for indexing and searching purposes if you want , remember that is an optional parameter
Example:
DM.KeyLeaveField(oMaster, "OrderId", 5)
»
|