How to enter data in a flowfield?

In Table1 I have defined Field1 as a FlowField like this: FieldClass=FlowField; CalcFormula=Lookup(Table2.Field1 WHERE (Field2=FIELD(Field2))); I’ve made a form for Table1 with Field1. Because Field1 is a Lookup FlowField, it will always show the first record from Table2 and that’s ok. My problem is, that I want to enter data in Field1, which should be inserted in Table2. I have made some code on the text box like this: Table2.Field1 := Table1.Field1; Table2.Insert; But I’m getting the error “The CalcFormula for the field1 FlowField in the Table1 table should start with ‘Sum(…’.” Does anyone have an idea, how to solve this? Thanks Ole

Look at the budget functions in G/L or Job. You will see that the primary key in the underlaying table must be an integer, and Yes. The calculation formula must be sum(MyTable.MyField) //Lars

Hi Lars Thanks for your reply. I have already looked at the budget, and I want my form to do exactly the same. But the field I lookup has the datatype Code and not decimal. So I cannot use the Sum CalcFormula. I think I have to write some code, which allows me to enter data in the Flowfield but without giving me the error message. Ole