Basic programming problems

My brain is struggling with some basic stuff here.  I’ve got this little area in my report which looks for a Hammer Correction Factor.

 

 

At present, I’ve got the Hammer Correction in two locations in my library.

 

One here, in Rig Type

 

The other is in a Hammer Correction Factor area.  It shows more detail, and allows a history to be maintained. 

 

 

We only use the correction factor at one location in the database (Sample), but we’ve had to use it with each sample, not each borehole.  It comes from “Libtbl!hammer correction factor”

  

 

 

Here’s my report Lookup function.  It doesn’t seem to like it.  I’ve tried several ideas, but I can’t get it to work the way I want.

  

 

 

 

For now, I’d just love to get my silly HCF to show up.  What am I doing wrong?

 

Secondly, I was discussing some things with a colleague.  In the future, there may be long investigations which are over the span of a couple of correction factors.  With that, we’d have to have a way to tie in a couple different factors in the same project.  Right now, we have the factor tied to a single rig.  Any reference to that rig only has a single HCR.  I almost feel like we’d need to add a duplicate rig with a different factor in this case.  Do you have any alternate ideas on this?