#Error on form when no data present: Access 2003...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dököll
    Recognized Expert Top Contributor
    • Nov 2006
    • 2379

    #Error on form when no data present: Access 2003...

    Hey Fans!

    Perhaps you can help me...

    I am using MS Access 2003. I have tried a number of things to get rid of the text #Error from appearing on form fields when no data present.

    Tried the NZ function, also tried the IIF function, told it to give me zero if no data found, so far it seems to lead to nowhere land. What are your thoughts? Hopefully it's not very simple and I missed the boat, hee hee...

    Thanks for your help!

    Dököll
  • blad3runn69
    New Member
    • Jul 2007
    • 59

    #2
    sounds like there is a problem with your form fields. Fields should appear empty if there is no data in the underlying table/query/expression.

    #error/#name etc. in the field would suggest there is a problem in retreiving the value, not that the value is null

    Comment

    • missinglinq
      Recognized Expert Specialist
      • Nov 2006
      • 3533

      #3
      While that's true of #Name, it's on ly sometimes true of #Error! With #Error it can also mean that the expression used as ControlSource cannaot be evaluated. What's the expression you have in the ControlSource for this field?

      Linq ;0)>

      Comment

      • blad3runn69
        New Member
        • Jul 2007
        • 59

        #4
        Originally posted by missinglinq
        While that's true of #Name, it's on ly sometimes true of #Error! With #Error it can also mean that the expression used as ControlSource cannaot be evaluated. What's the expression you have in the ControlSource for this field?

        Linq ;0)>
        thanks missinglinq you are right it is most likely a prob with the fields controlsource expression, nice call:)

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32633

          #5
          Tell us what you are populating the fields with in your form.
          Include the details for a control where this happens as well as the RecordSource of the form itself if you can.

          Comment

          • Dököll
            Recognized Expert Top Contributor
            • Nov 2006
            • 2379

            #6
            Hey Gang!

            Thanks for replying and please excuse the late reply. The form is being populated by a subform which is being populated by a query, will post some of the work to get an idea:

            This is one of the fields that have the #Error instance

            [CODE=VB]

            =[InfoOnlyDataPRE].Form!InfoInfo

            [/CODE]

            This is the subform portion, an attempt to calculate all items within that column/field abd feed it to the form using =[InfoOnlyDataPRE].Form!InfoInfo

            [CODE=VB]

            =Sum(NZ([Informational]))

            [/CODE]

            This is our query portion, an attempt to feed items to subform column/field

            [CODE=VB]

            Informational: IIf(NZ([DataCentralRepo rt!Category]="PreErrors" And [DataCentralRepo rt!Informationa l])=True,1,0)

            [/CODE]

            It looks like it should work, I should get zero, don't you think? When data are available as mentioned, all is well. Something is there, and I just can't quite put my finger on it.

            Let me kow what you see. And thanks for your assistance, very cool.

            Dököll

            Comment

            Working...