private sub Form_Load( )
General information
Full name frmemployee.Form_Load Access private Overload of Purpose Set the security of this form and loads data from the database. Prototype private sub Form_Load( ) History NOVALYS - 2001/10/20 - Creation
Source code
Private Sub Form_Load()
'*********************************************************
' Purpose : Set the security of this form and loads data from the database.
' Subject : INTERNAL
' History : NOVALYS - 2001/10/20 - Creation
'*********************************************************
On Error GoTo Erreur
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "select emp_id,manager_id,emp_fname,emp_lname,dept_id,street,city,state,zip_code,phone,status,ss_number,salary,start_date,termination_date,birth_date,bene_health_ins,bene_life_ins,bene_day_care,sex from employee Order by emp_id", db, adOpenStatic, adLockOptimistic
Set grdDataGrid.DataSource = adoPrimaryRS
mbDataChanged = False
'=================================================
intRet = MyVisualGuard.SetSecurity(Me, "open", "")
'=================================================
Exit Sub
Erreur:
MsgBox Err.Description, , "Visual Guard"
End Sub
Functions and events referenced
Full name Owners MyVG.SetSecurity MyVG Recordset.Open Recordset
Referenced classes
Full name grdDataGrid Recordset adoPrimaryRS
Referenced properties
Full name Scope ModMain.MyVisualGuard attribute frmemployee.intRet attribute frmemployee.mbDataChanged attribute DataGrid.DataSource attribute ModMain.db attribute
private sub Form_Resize( )
General information
Full name frmemployee.Form_Resize Access private Overload of Purpose Moves the controls according to the form size. Comment If you add a new control in this form you must add the code the position of this control. Prototype private sub Form_Resize( ) History NOVALYS - 2001/10/20 - Creation
Source code
Private Sub Form_Resize()
'*********************************************************
' Purpose : Moves the controls according to the form size.
' Comment : If you add a new control in this form you must add the code the position of this control.
' Subject : GUI
' History : NOVALYS - 2001/10/20 - Creation
'*********************************************************
On Error Resume Next
'Resize the datagrid
grdDataGrid.Height = Me.ScaleHeight - 30 - picButtons.Height - picStatBox.Height
lblStatus.Width = Me.Width - 1500
cmdNext.Left = lblStatus.Width + 700
cmdLast.Left = cmdNext.Left + 340
End Sub
Referenced classes
Full name cmdLast cmdNext lblStatus picStatBox picButtons frmemployee grdDataGrid
private sub Form_KeyDown( KeyCode as Integer , Shift as Integer )
General information
Full name frmemployee.Form_KeyDown Access private Overload of Purpose Form-Level Keyboard Handlers. Parameter KeyCode : The key code the key that was pressed. Shift : An integer that corresponds to the state of the SHIFT, CTRL, and ALT keys at the time of the event. Prototype private sub Form_KeyDown( KeyCode as Integer , Shift as Integer ) History NOVALYS - 2001/10/20 - Creation
Parameters
Shift Integer KeyCode Integer
Source code
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
'*********************************************************
' Purpose : Form-Level Keyboard Handlers.
' Comment :
' Parameter : KeyCode : The key code the key that was pressed.
' Shift : An integer that corresponds to the state of the SHIFT, CTRL, and ALT keys at the time of the event.
' Subject : GUI
' History : NOVALYS - 2001/10/20 - Creation
'*********************************************************
If mbEditFlag Or mbAddNewFlag Then Exit Sub
Select Case KeyCode
Case vbKeyEscape
cmdClose_Click
Case vbKeyEnd
cmdLast_Click
Case vbKeyHome
cmdFirst_Click
Case vbKeyUp, vbKeyPageUp
If Shift = vbCtrlMask Then
cmdFirst_Click
Else
cmdPrevious_Click
End If
Case vbKeyDown, vbKeyPageDown
If Shift = vbCtrlMask Then
cmdLast_Click
Else
cmdNext_Click
End If
End Select
End Sub
Functions and events referenced
Full name Owners cmdNext.cmdNext_Click cmdNext cmdPrevious.cmdPrevious_Click cmdPrevious cmdFirst.cmdFirst_Click cmdFirst cmdLast.cmdLast_Click cmdLast cmdClose.cmdClose_Click cmdClose
Referenced properties
Full name Scope frmemployee.Form_KeyDown.Shift parameter frmemployee.Form_KeyDown.KeyCode parameter frmemployee.mbAddNewFlag attribute frmemployee.mbEditFlag attribute
private sub Form_Unload( Cancel as Integer )
General information
Full name frmemployee.Form_Unload Access private Overload of
Parameters
Cancel Integer
Source code
Private Sub Form_Unload(Cancel As Integer)
Screen.MousePointer = vbDefault
End Sub
Document created on Wednesday 20 March 2002 at 09:57 by Visual Expert