smtazulislam
Member
- Local time
- Today, 03:40
- Joined
- Mar 27, 2020
- Messages
- 806
Hi,
I have an employee database where tblEmployee into field EmployeeID (PK) to relationship (FK) 8 tables and 8 forms.
And I have a table also tblStatus:
StatusID - AutoN
Status- PK (this field is relationship with tblEmployee)
Data Record is - 1. Active - 2. Final Exit - 3.Vacation - 4. Escape (Runaways) - 5. Police Custody.
So, I want if I select "cboStatus" 2. Final Exit - 4. Escape (Runaways) - 5. Police Custody from frmEmployee FORM then employees all data is Disabled within 8 forms. and if 1. Active - 3.Vacation - then data isEnable.
What I try :
This method is worked. But when form reopen then all data is enable again.
Hope an expert pleasure to give advice .... How to do it once 8 forms.
I have an employee database where tblEmployee into field EmployeeID (PK) to relationship (FK) 8 tables and 8 forms.
And I have a table also tblStatus:
StatusID - AutoN
Status- PK (this field is relationship with tblEmployee)
Data Record is - 1. Active - 2. Final Exit - 3.Vacation - 4. Escape (Runaways) - 5. Police Custody.
So, I want if I select "cboStatus" 2. Final Exit - 4. Escape (Runaways) - 5. Police Custody from frmEmployee FORM then employees all data is Disabled within 8 forms. and if 1. Active - 3.Vacation - then data is
What I try :
Code:
Private Sub EnableData()
txtEmployeeID.Enabled = true
txtEmployeeName.Enabled = true
alltxt.......=true
End Sub
Private Sub DisabledData()
txtEmployeeID.Enabled = false
txtEmployeeName.Enabled = false
alltxt.....=false
End Sub
Private Sub cboStatus_Change()
If (Me.cboStatus) = 2 Or 4 Or 5 Then
DisabledData
Else
EnableData
End If
End Sub
This method is worked. But when form reopen then all data is enable again.
Hope an expert pleasure to give advice .... How to do it once 8 forms.
Last edited: