Hi All,
I'm not sure about the best way to go about this as I'm new to access... I've got a bit of a headache so hopefully I am explaining things properly!
I'll explain the relevant tables first:
tblEmployees
UserID (PK - Autonumber)
PayID (Unique employee ID)
EmpName (Employees' first and last name)
Location (Related to tblLocation.Location)
tblLog
LogID (PK - Autonumber)
AdminID (Related to tblAdmin.AdminID)
LogDate (set to log the current date/time)
UserID (Related to tblEmployees.UserID)
IsError (Byte - No=0, Yes=1)
ErrorDate (Date employee made the error)
UtilityID (Related to tbl.Utility.UtilityID)
ErrorID (Related to tbl.Errors.ErrorID)
Action (What the admin that logged the error has done)
Fedback (Byte - No=0, Yes=1
I've created a form (frmLog) that the admin will use to create an error on the log. I would like them to be able to enter the full name of the employee but as you can see from tblLog I've not added in this field ('EmpName') and have opted to keep it straightforward using the employees' 'UserID'.
How can I have it lookup the' UserID' from 'tblEmployees.UserID' when they enter the 'EmpName' into the text box 'UserID'?
P.S. I've taken a screenshot the relationships window (hopefully this helps) - tinypic.com/r/sgr1wo/6
Many thanks
I'm not sure about the best way to go about this as I'm new to access... I've got a bit of a headache so hopefully I am explaining things properly!
I'll explain the relevant tables first:
tblEmployees
UserID (PK - Autonumber)
PayID (Unique employee ID)
EmpName (Employees' first and last name)
Location (Related to tblLocation.Location)
tblLog
LogID (PK - Autonumber)
AdminID (Related to tblAdmin.AdminID)
LogDate (set to log the current date/time)
UserID (Related to tblEmployees.UserID)
IsError (Byte - No=0, Yes=1)
ErrorDate (Date employee made the error)
UtilityID (Related to tbl.Utility.UtilityID)
ErrorID (Related to tbl.Errors.ErrorID)
Action (What the admin that logged the error has done)
Fedback (Byte - No=0, Yes=1
I've created a form (frmLog) that the admin will use to create an error on the log. I would like them to be able to enter the full name of the employee but as you can see from tblLog I've not added in this field ('EmpName') and have opted to keep it straightforward using the employees' 'UserID'.
How can I have it lookup the' UserID' from 'tblEmployees.UserID' when they enter the 'EmpName' into the text box 'UserID'?
P.S. I've taken a screenshot the relationships window (hopefully this helps) - tinypic.com/r/sgr1wo/6
Many thanks