<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Cambria;
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:14.0pt'>I&#8217;m using BDS 2006,
InfoPower dbGrid and InfoPower dbComboLookups. My application is for orders
that are placed to purchase the manufactured drawer boxes and uses master-detail
tables; namely orders and orderdetail. Some of the detail data is entered in
either dbEdits or dbLookups. These are used for data that is the same for each
detail record. The dbGrid is used for the particulars for the items to be
manufactured; namely, quantity, width, depth, height, and up to 7 options, the
square foot price for the drawer box and the extended price (computed as square
foot price * quantity + cost of the options selected). To determine the square
foot price the program has to use the type of wood chosen for the drawer boxes,
the height of the box, the price table and determine if the square feet for the
box is greater than the minimum 1.5 square feet.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:14.0pt'>Sometimes the program finds
the correct price and sometimes it doesn&#8217;t on the same order. I have a
procedure that &#8216;calculates&#8217; the price. I think that perhaps I&#8217;m
over calling this procedure. <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:14.0pt;color:black'>The fields for
the order and orderdetail tables are persistent.</span><span style='font-size:
14.0pt'><o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:14.0pt'>Currently t</span><span
style='font-size:14.0pt;color:black'>here are several infopower lookup controls
which have an OnCloseUp event. Some of these are attached to the infopower grid.
The &#8216;calculate&#8217; procedure is called in this event. The persistent
fields call the &#8216;</span><span style='font-size:14.0pt'>calculate&#8217;</span><span
style='font-size:14.0pt;color:black'> procedure in the OnValidate and/or the OnExit
event. And to top this off I have the dbGrid calling the &#8216;</span><span
style='font-size:14.0pt'>calculate</span><span style='font-size:14.0pt;
color:black'>&#8217; procedure for the OnCellChange event. I guess I wanted to
get the price figured out no matter what happened, lol. <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:14.0pt;color:black'>So the question
is: What is the way I&#8217;m supposed to get the price figured out? Namely, do
I use the DataSet&#8217;s OnDataChange event, do I use the persistent
fields&#8217; OnValidate event or is it better to use the OnChange event, do I
use the dbGrid&#8217;s OnCellChange event, or do I use the controls OnExit or
OnCloseUp event. Or should I do something different?<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;color:black'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:14.0pt;color:black'>I&#8217;ve
learned that most folks recommend against using a dbGrid the way that I am; but
my bottom line is I need for each record to have the correct square foot price
and the corresponding total for that record.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:14.0pt;color:black'>Thank you for any
help.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:14.0pt;color:black'>Charlie</span><span
style='font-size:10.0pt;color:black'><o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:14.0pt;font-family:"Cambria","serif"'><o:p>&nbsp;</o:p></span></p>

</div>

</body>

</html>