Hello, I am trying to find a certain ID depending on the values of a couple comboboxes I have on my form. This is my code right now:
Dim lookup As String
Dim emp As Integer
emp = Me.TXT_EMP.Column(2)
Dim trng As Integer
trng = Me.TXT_TR.Column(1)
lookup = DLookup("[TRAINING]", "[EMP_TRNG_TBL]", "[TRNG_ID] =" & trng)
MsgBox lookup
Right now it is returning the training based on the TRNG_ID chosen on the form. The problem is I want to include an EMP_ID criteria which would filter only the trainings with that certain ID and that certain EMP_ID. I have a combobox for EMP_ID and I have it set as the interger emp and it is returning the correct value. I just can not filter both EMP_ID and TRNG_ID at the same time. Any assistance would be appreciated, thank you.