"#a type!" error in the calculated report field

I have a report in Access with three fields in it: Width, Heightand Area.
 Widthand are Heightpulled from the table to which the report is attached, while it Areashould be calculated (height * width). I installed Control Sourcefrom Areain = [Height] * [Width], but when I open the form, the field is displayed #Type!, in typically descriptive access methods, with good use #and !, to do this, itโ€™s impossible for Google exactly ... but I got distracted. I have no idea what that means #Type!, and Access doesn't want to tell me.

I do not understand this. In the linked table, Heightand Widthare integers, and both of them are filled in the record being viewed (therefore, this is not a problem NULL). If I changed Control Sourceto something really simple - for example, =[Height]he spat out instead #Error!(again, thanks for the useful intel, Access. We would be lost without you). Even = 1spits out #Error!.

Any idea why Access hates my control sources?

+4
source share
4 answers

You probably came across a name, that is, Access gets the elements Widthand Heightobjects of the report, not fields Widthand Height.

. , :

  • , WidthValue: Width HeightValue: Height ;
  • , , , .
+3

. , , ? , .

, , , - , , , . , HHeight WWidth - ?

+3

, . , , . , , , []. [], .

0

right-click on the AREA address and select properties, then go to the EVENT tab, then click "ON ENTER" in the [Event Procedure] drop-down list and click on the dots on the right and go to "MICROSOFT VISUAL BASIC FOR APPLICATION" in this window enter this code above "End Sub"

Area = Height * Width

but note that the name you enter in this code should be in your database and just like the things that enter in the line of luck code

-1
source

All Articles