Results 1 to 5 of 5
  1. #1
    Lounger
    Join Date
    Jul 2001
    Location
    Fort Myers, Florida, USA
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    #error messages and subforms (97 and 2000)

    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

  2. #2
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Frederick, Maryland, USA
    Posts
    296
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: #error messages and subforms (97 and 2000)

    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.

  3. #3
    Lounger
    Join Date
    Jul 2001
    Location
    Fort Myers, Florida, USA
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: #error messages and subforms (97 and 2000)

    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.

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: #error messages and subforms (97 and 2000)

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

  5. #5
    Lounger
    Join Date
    Jul 2001
    Location
    Fort Myers, Florida, USA
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: #error messages and subforms (97 and 2000)

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •