• #error messages and subforms (97 and 2000)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » #error messages and subforms (97 and 2000)

    Author
    Topic
    #358271

    The #error message appears on the main form. I am referencing a field/control on a subform. When the subform is populated with data, the control displays the answer perfectly However, when the subform does not contain data, #error appears.

    I know about the erravoid function to correct the problem in the report but not in the form. Can anyone help?

    Thank you

    Scott

    Viewing 0 reply threads
    Author
    Replies
    • #534196

      I just had this problem in an application I’m developing. In my case, it happened because I assigned a default value to both the control on the subform and the corresponding field in the database table. As soon as I removed the default value from the table field, #Error disappeared from the control on the subform. I hope this helps.

      • #534200

        If figured it out. Nothing difficult but a real pain. I had to create duplicate fields for each field that would have a problem. I then used the erravoid function on that field. Whenever there would be an error, 0 would appear. subform field TotalProfit woud display as an error. In the duplicate field, I would use =erravoid(TotalProfit) as the control source.

        • #534211

          Did you try using the Nz function in the original version, without the duplicate fields?

          • #534221

            NZ does not work because the original field yields an error not a null value. Use the erravoid function found at Microsoft.

    Viewing 0 reply threads
    Reply To: #error messages and subforms (97 and 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: