General information
Category:
Coding, syntax & commands
Cetin
Parenthesis did the trick.
Thanks
Gaylen
>>I have a grid with a calculated column made up of addition and subtractions of several of the field values in the table. Example - Sales - Return - Receipts = Balance Due. The calculation is correct when the grid is initalized.
>>
>>I use the following code to maintain the grid while I am doing other processs using the underlying table such as displaying a screen which summarizes some of the data in the table.
>>
>>Thisform.grid1.RecordSource = Space(0)
>>
>>
>>When focus is returned to the grid, all the column values are correct except that the calculated column displays the values of one of the email fields in the table instead of the calculated amount.
>>
>>I tried to reset the recordsource of the calculation column but that doesn't correct the problem.
>>
>>Anyone have an idea what is happening and how I can get the calculation to display correctly in the grid?
>>
>>Thanks
>>Gaylen
>
>Gaylen,
>You should reassign the controlsource for calculated column. When grid doesn't have a controlsource for a column it picks the next from recordsource.
>When assigning calculated fields use the aliases + parentheses. Failing to use parentheses is a common cause of blank column.
>
>thisform.myGrid.Columns(n).Controlsource = ;
>"(myTable.Example - myTable.Sales - myTable.Return - myTable.Receipts)"
>
>Cetin
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only