Hi All
I did my first attempt at a calculated field in a dbgrid using a Microsoft Access database. Here is the code:AdoTable1.FieldValues['CalAdd']:= AdoTable1.FieldValues['Part Name']+ AdoTable1.FieldValues['Part Number'];
end;
The results were not as I expected when I added the two values..ie 1 + 2= 12 in the CalAdd field. I also tried the
formula with a multiply operator just as a test and the result was 2. The multiplied result was correct but the addition looked like it was adding a text string together.
In the access table I tried to set the field property to number type but when I ran the program I got a type error. So I set the access property to Text. I assume this is the problem. Not certain how to correct this.
I did my first attempt at a calculated field in a dbgrid using a Microsoft Access database. Here is the code:AdoTable1.FieldValues['CalAdd']:= AdoTable1.FieldValues['Part Name']+ AdoTable1.FieldValues['Part Number'];
end;
The results were not as I expected when I added the two values..ie 1 + 2= 12 in the CalAdd field. I also tried the
formula with a multiply operator just as a test and the result was 2. The multiplied result was correct but the addition looked like it was adding a text string together.
In the access table I tried to set the field property to number type but when I ran the program I got a type error. So I set the access property to Text. I assume this is the problem. Not certain how to correct this.