0

table links with sql

I have a collection of medals and each medal is for a specific campaign (there are hundreds of campaigns!).  That campaign has a specific reference, e.g. Trafalgar is 94AJ.  I have created a table (tbl_list) that has two fields: fld_aref (for the reference) and fld_adesc (which contains text details of the medal - this is a long string).  I have created a table (tbl_stock) which I want to use to enter the individual medals together with other pieces of information (condition, price, etc). 

The first part is to enter the medal reference in the stock table (field name is fld_bref) and what I have tried to do (without success!) is to have a second field (fld_bdesc) which automatically updates the description from the table tbl_list when the reference is entered. What I have tried so far is to create a select statement in the tbl_stock.fld_bdesc (an ordinary text box) to find the record in tbl_list using the reference as a link. I have years of using MS Access so I may be making this far more complicated than is really is, or a complete hash of it! but I would appreciate some help. Thanks

1 reply

null
    • Rosewyn
    • 5 yrs ago
    • Reported - view

    Pleased to say I got there!

    let xb := "";
    xb := fld_bref;
    (select tbl_list where fld_aref = xb).fld_adesc

    easy really :)

Content aside

  • 5 yrs agoLast active
  • 1Replies
  • 975Views