Although it may sound inefficient, I have a requirement to display a field called Type (representing the aircraft type) in the main table called TblTcAOG which is also present in the table tblactype.
This field is related to REG (the registration of the aircraft) via a sort of convoluted process linked via 2 tables.
In TblTcAOG I want to specify the aircraft's registration REG and then for Access to look up the REG from TblTcAOG in TblAcrft and give me the ModelLink which in turn corresponds to the actypeid in tblactype to then give me the Type.
I have written an expression which gives me exactly what I want in appearance on the form that I am using for filling in the details for TblTcAOG, but I don't know how to get this Dlookup to write the Type information into TblTcAOG.
If anything I have said is confusing or needs further explanation, please let me know and I will try to help.
This field is related to REG (the registration of the aircraft) via a sort of convoluted process linked via 2 tables.
In TblTcAOG I want to specify the aircraft's registration REG and then for Access to look up the REG from TblTcAOG in TblAcrft and give me the ModelLink which in turn corresponds to the actypeid in tblactype to then give me the Type.
I have written an expression which gives me exactly what I want in appearance on the form that I am using for filling in the details for TblTcAOG, but I don't know how to get this Dlookup to write the Type information into TblTcAOG.
Code:
=DLookUp("Type","tblactype","actypeid = " & DLookUp("ModelLink","TblAcrft","Reg = '" & [Forms]![FrmRec]![REG] & "'"))
If anything I have said is confusing or needs further explanation, please let me know and I will try to help.