Concatenate problem?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nexeh
    New Member
    • May 2007
    • 5

    Concatenate problem?

    This has been driving me nuts for some time now. I have a table that has field names FirstName, LastName, MiddleIntial, AssumedFirst, AssumedMiddle,a nd AssumedLast. But it seems that whenever I concatenate anything with the LastName field or the AssumedFirst I will receive a #error. ANY other combinations will work just fine? I don't get what wrong with these two fields? I have checked there name against the table and everything looks fine. Here's my formula:

    =[AssumedLast] & ", " & [AssumedFirst] & " " & [AssumedMiddle]
    =[LastName] & ", " & [FirstName] & " " & [MiddleIntial]

    Any ideas? It's driving me crazy, and I'm wasting so much time trying to understand why. I've even copied and pasted names with no luck. These are for reports.
  • JConsulting
    Recognized Expert Contributor
    • Apr 2007
    • 603

    #2
    Originally posted by nexeh
    This has been driving me nuts for some time now. I have a table that has field names FirstName, LastName, MiddleIntial, AssumedFirst, AssumedMiddle,a nd AssumedLast. But it seems that whenever I concatenate anything with the LastName field or the AssumedFirst I will receive a #error. ANY other combinations will work just fine? I don't get what wrong with these two fields? I have checked there name against the table and everything looks fine. Here's my formula:

    =[AssumedLast] & ", " & [AssumedFirst] & " " & [AssumedMiddle]
    =[LastName] & ", " & [FirstName] & " " & [MiddleIntial]

    Any ideas? It's driving me crazy, and I'm wasting so much time trying to understand why. I've even copied and pasted names with no luck. These are for reports.
    Where are you putting this...directly into your report? are you checking for null values anywhere?
    J

    Comment

    • nexeh
      New Member
      • May 2007
      • 5

      #3
      Originally posted by JConsulting
      Where are you putting this...directly into your report? are you checking for null values anywhere?
      J
      Yes, it's a textbox control that i'm setting the controlsource to the function I supplied. I am not currently checking for null values but i'm currently using test data that has all fields completed. In the future all these fields will be require when the user is performing dataentry.

      I have to say i'm stumped, i've never had this problem before.

      Comment

      • JConsulting
        Recognized Expert Contributor
        • Apr 2007
        • 603

        #4
        Originally posted by nexeh
        Yes, it's a textbox control that i'm setting the controlsource to the function I supplied. I am not currently checking for null values but i'm currently using test data that has all fields completed. In the future all these fields will be require when the user is performing dataentry.

        I have to say i'm stumped, i've never had this problem before.
        a #error normally means that you've made reference to a control or field that doesn't exist. I assume that all of these fields (individually) exist on the report so it comes down to what they are named. Are you missing a space in the fieldnames, are they included in the recordset, etc...
        Hard to say when we can't see it here...but that's what the error points to.

        As a test, set the concatenated field = [assumedname] (whichever control it fails on) to see if it returns just that one.

        J

        Comment

        • nexeh
          New Member
          • May 2007
          • 5

          #5
          Originally posted by JConsulting
          a #error normally means that you've made reference to a control or field that doesn't exist. I assume that all of these fields (individually) exist on the report so it comes down to what they are named. Are you missing a space in the fieldnames, are they included in the recordset, etc...
          Hard to say when we can't see it here...but that's what the error points to.

          As a test, set the concatenated field = [assumedname] (whichever control it fails on) to see if it returns just that one.

          J
          I understand that completely. What doesn't make sense is why is it just these two field names.. The only thing i can think of is that it's getting confused with another field? I even searched all table for ambiguity with no luck! Last i can use these same field names by themselfs with no problem. It's bugging me!

          Comment

          • nexeh
            New Member
            • May 2007
            • 5

            #6
            I GOT IT! The textbox name defaulted to LastName and it was causeing it to confussing the field name of LastName. Once i changed the control name i was all set! Thanks for all your help. Sometime you just need to talk things out with someone!

            Comment

            • JConsulting
              Recognized Expert Contributor
              • Apr 2007
              • 603

              #7
              Originally posted by nexeh
              I GOT IT! The textbox name defaulted to LastName and it was causeing it to confussing the field name of LastName. Once i changed the control name i was all set! Thanks for all your help. Sometime you just need to talk things out with someone!
              Happy to help.
              J

              Comment

              Working...