ColumnHistory() generating display error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DentonChris
    New Member
    • Feb 2017
    • 3

    ColumnHistory() generating display error

    Source: 2007 Call Tracker template DB. After generating a few records and putting in some comment data, I wanted to add a policy reference to each call. I added a policy table with two fields; pid, pName. I added a field to the Calls table called policy and set a one-to-many relationship with policy.pid. The policy table is populated. Before I add policy.pName to the Call Details form, I can see comment history. After adding the field, the comment area generates #Error. I didn't do anything to the comments field, so I don't understand why it's throwing an error. help me understand. thanks!
  • DentonChris
    New Member
    • Feb 2017
    • 3

    #2
    So digging around the interweb for the columnhistory syntax, there were a few comments about having to replace the [RecordSource] alias with the actual table name. Making this change works to correct the history error. However, I am still not clear on why the introduction of the new table's field on the form generates the error. I would be interested in the explanation, if anybody can provide it.

    Comment

    • jforbes
      Recognized Expert Top Contributor
      • Aug 2014
      • 1107

      #3
      I don't have a copy of the Call Tracker Template Database, so I can only go from what you have supplied. I would guess the reason using the Table Name as the RecordSource seems to work is that it returns all the fields in the Table, compared to what was there before, which I would guess was a Query which was returning only specific fields.

      What concerns me most is that now that you have changed the RecordSource to the Table, if the previous RecordSource was bringing in a field that is not in the Table, or it was calculating a field, you may have some new problems with missing fields on your Form.

      Comment

      • DentonChris
        New Member
        • Feb 2017
        • 3

        #4
        no. I didn't change the recordsource property. I changed the field query all together. I think, because the recordsource function is a form property, it assumes the table/query/formSQLexpressi on is recordsource for everything in the form. In this case, I am adding a form selection box from a different table which isn't part of the form.recordsour ce property. Referencing calls.comments directly removes the dependency on the funciton property.

        Comment

        Working...