CODE
Me.cboFRNDrafter = DLookup("[FRNID]", "tblHIRFRN", "[HIRID]=" & Forms![frmHIREdit]![txtHIRID] And "[FRNDrafter]=" & -1)
Me.cboFRNPeer = DLookup("[FRNID]", "tblHIRFRN", "[HIRID]=" & Forms![frmHIREdit]![txtHIRID] And "[FRNPeer]=" & -1)
Me.cboFRNSRO = DLookup("[FRNID]", "tblHIRFRN", "[HIRID]=" & Forms![frmHIREdit]![txtHIRID] And "[FRNSRO]=" & -1)
Me.cboFRNPeer = DLookup("[FRNID]", "tblHIRFRN", "[HIRID]=" & Forms![frmHIREdit]![txtHIRID] And "[FRNPeer]=" & -1)
Me.cboFRNSRO = DLookup("[FRNID]", "tblHIRFRN", "[HIRID]=" & Forms![frmHIREdit]![txtHIRID] And "[FRNSRO]=" & -1)
tblHIRFRN = associative table, resolving a many-to-many relationship between tblHIR and tblFRN. It contains the following attributes:
- HIRFRNID (autonumber key)
- HIRID (primary key from tblHIR)
- FRNID (primary key from tblFRN)
- FRNDrafter (Yes/No datatype, indicating type of FRN record)
- FRNPeer (Yes/No datatype, indicating type of FRN record)
- FRNSRO (Yes/No datatype, indicating type of FRN record)
Each individual HIR record will have three FRN records, therefore there will be three rows for each HIR in the tblHIRFRN table. The Yes/No datatype is to indicate the TYPE of FRN.
Why are the three DLookups returning a value of NULL, instead of the FRNID like I thought they would?
Thanks very much!
- Keith