Question Displaying the Value based on Criteria

chrisguk

Active member
Joined
Nov 20, 2011
Messages
29
Programming Experience
Beginner
Hi,

I want to carry out the following action:

Main Form: Sites datasource tblSites

Subform: SiteInstallation datasource tblSiteInstallation

Columns in tblSiteInstallation: pkSiteInstall, InstallDetail, fkMeterStockID

fkMeterStockID is a combo pulling the data from tblMeterStock.

tblMeterStock has the following columns: pkMeterStock, StockDetail, fkMeterTypeID

tblMeterType has the following columns: pkMeterTypeID, TypeDetail

In my form MeterInstalltions the combo shows StockDetail from tblMeterStock

What I want to do is have a text box to show the TypeDetail from tblMeterType where tblMeterStockID = fkMeterTypeID

hope that make sense
 
Hi again,

It may be worth me putting it in a different way:

Basically I have three tables:

Table1: Columns = pkInstallationID, InstallationDetail, fkMeterStockID - (fkMeterStockID uses a combobox to pull MeterStockDetail from Table2)

Table2: Columns = pkMeterStockID, MeterStockDetaiil, fkMeterTypeID -

Table3: Columns = pkMeterTypeID, MeterTypeDetail

It is quite easy to link the fkMeterTypeID to Table1's Form but I want to know what text the value represents for example:


Label: fkMeterStockID Label: MetertypeDetail (that matches the selecttion on the combo in fkMeterStockID)
 
Back
Top