B
BenEl via AccessMonster.com
Hi. I'm having trouble thinking through the logic for this. Can someone point
me in the right direction?
I have a subform that the users can attach a Position (PK=PositionID) to a
Candidate (PK=CandidateID). When this is done, the Candidate and Position
IDs/information are populated in a third table "Interview". The subform has
a textbox with :
="" & [Job Title] & " (" & [Status] & ")"
This textbox has navigation buttons so the user can scroll through the
positions that are attached to the candidate. I also have a combo box that
lists all positions (that are open). Users use this combo box to attach a new
position to the candidate.
When the user chooses a position from the combo box, they click on a button
to confirm. I currently have the DLookup on the confirm button:
If Not IsNull(DLookup("[PositionID]", "MT_Interview", "[PositionID] = " & Me.
SelectJob)) Then
MsgBox "This position is already attached to this candidate. Please choose
another position.", vbOKOnly
Me.SelectJob.SetFocus
End If
The DLookup looks up ANY occurance of Position ID in the table. I would like
to look up only those related to the CandidateID they are currently on. i
know I need to add CandidateID in the lookup, but not sure how.
Thanks for any help!
me in the right direction?
I have a subform that the users can attach a Position (PK=PositionID) to a
Candidate (PK=CandidateID). When this is done, the Candidate and Position
IDs/information are populated in a third table "Interview". The subform has
a textbox with :
="" & [Job Title] & " (" & [Status] & ")"
This textbox has navigation buttons so the user can scroll through the
positions that are attached to the candidate. I also have a combo box that
lists all positions (that are open). Users use this combo box to attach a new
position to the candidate.
When the user chooses a position from the combo box, they click on a button
to confirm. I currently have the DLookup on the confirm button:
If Not IsNull(DLookup("[PositionID]", "MT_Interview", "[PositionID] = " & Me.
SelectJob)) Then
MsgBox "This position is already attached to this candidate. Please choose
another position.", vbOKOnly
Me.SelectJob.SetFocus
End If
The DLookup looks up ANY occurance of Position ID in the table. I would like
to look up only those related to the CandidateID they are currently on. i
know I need to add CandidateID in the lookup, but not sure how.
Thanks for any help!