Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Related Table Value on Form Load for comparison in control

Status
Not open for further replies.

SimonPGreen

IS-IT--Management
Mar 8, 2004
116
GB
Hi,

Can anyone point me in the right direction on the best way to achieve the following:

Two Related Tables 1:Many with from bound to each
Packages Applications

On open or current event on Packages form do the following (shown in psuedo mixed code for clarity(ish)):

curTempAppValue = Select TOP 1 applications.curForecastValue from Applications where applications.FKPackageRef = Form!Packages!txtPKPackageRef ORDER BY applications.intValuationNumber DESC

If Me!curLetterOfIntentValue.value <= curTempAppValue me!curLetterOfIntentValue.Backcolor = 255

Appreciate any advice.

Simon
 
Have a look at conditional formatting -it works in a similar way to the way it does in Excel.

Tom

Born once die twice; born twice die once.
 
Perhaps this ?
curTempAppValue = DLookUp("curForecastValue", "Applications", "FKPackageRef=Forms!Packages!txtPKPackageRef AND intValuationNumber=" _
& DMax("intValuationNumber", "Applications", "FKPackageRef=Forms!Packages!txtPKPackageRef"))

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top