Hi everyone,
I have a frmEmployees with subform of same table without linking child and master field, just to show the list this form is used to input data in DB, i have fields from tblEmployees cboEmpID and their are two buttons on the form for next and previous record.
I have code for cboEmpID selection when i select it imageholder which is unbound object frame show the employee picture but when i move it with button for next and previous it doesnt appear i want it should work in both ways, when i select it from cboEmpID and also if i use next and previous button image should appear.
my code is
And imageholder should not show image if cboEmpID selection/Value is changed or blank.
thanks for helping.
I have a frmEmployees with subform of same table without linking child and master field, just to show the list this form is used to input data in DB, i have fields from tblEmployees cboEmpID and their are two buttons on the form for next and previous record.
I have code for cboEmpID selection when i select it imageholder which is unbound object frame show the employee picture but when i move it with button for next and previous it doesnt appear i want it should work in both ways, when i select it from cboEmpID and also if i use next and previous button image should appear.
my code is
Code:
Private Sub cboEmpID_AfterUpdate()
Imageholder.Picture = Nz(DLookup("[picture]", "tblEmployees", "[EmpID]='" & Me.cboEmpID.Value & "'"), "")
End Sub
And imageholder should not show image if cboEmpID selection/Value is changed or blank.
thanks for helping.