Problem with Trim command

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • FlyerN87

    #1

    Problem with Trim command

    For some reason this command will not trim the names shown in the
    fields listed. I'm trying to do this in a text box on a report. I've
    done this fairly succesfully in other reports but I must have done
    something wrong here....


    I've tried both of these...

    =Trim([QGPL_BADGE1.OML NAM] & [QGPL_BADGE1.OMF NAM])
    =Trim([QGPL_BADGE1.OML NAM] &", "& [QGPL_BADGE1.OMF NAM])

    The fields are 25 character text fields.
    Any ideas?

  • jleckrone@hotmail.com

    #2
    Re: Problem with Trim command

    By your description, I'm assuming that when your textbox is displayed
    it is coming out like Smith, John? What the Trim function is
    going to do in your example is that it's going to put the last name and
    first name together first and then trim it. What you need to do is
    Trim both the LastName and FirstName so it looks like this:

    =Trim([QGPL_BADGE1.OML NAM]) & Trim([QGPL_BADGE1.OMF NAM])

    Try that.



    FlyerN87 wrote:[color=blue]
    > For some reason this command will not trim the names shown in the
    > fields listed. I'm trying to do this in a text box on a report. I've
    > done this fairly succesfully in other reports but I must have done
    > something wrong here....
    >
    >
    > I've tried both of these...
    >
    > =Trim([QGPL_BADGE1.OML NAM] & [QGPL_BADGE1.OMF NAM])
    > =Trim([QGPL_BADGE1.OML NAM] &", "& [QGPL_BADGE1.OMF NAM])
    >
    > The fields are 25 character text fields.
    > Any ideas?[/color]

    Comment

    • FlyerN87

      #3
      Re: Problem with Trim command

      Thanks, That did the trick!

      Comment

      • Steve Jorgensen

        #4
        Re: Problem with Trim command

        Uh - I assume there should still be -one- space between the names...

        =Trim([QGPL_BADGE1.OML NAM]) & ' ' & Trim([QGPL_BADGE1.OMF NAM])

        By the way, who chose those field names? They're abominable.



        On 18 Nov 2005 07:53:28 -0800, jleckrone@hotma il.com wrote:
        [color=blue]
        >By your description, I'm assuming that when your textbox is displayed
        >it is coming out like Smith, John? What the Trim function is
        >going to do in your example is that it's going to put the last name and
        >first name together first and then trim it. What you need to do is
        >Trim both the LastName and FirstName so it looks like this:
        >
        >=Trim([QGPL_BADGE1.OML NAM]) & Trim([QGPL_BADGE1.OMF NAM])
        >
        >Try that.
        >
        >
        >
        >FlyerN87 wrote:[color=green]
        >> For some reason this command will not trim the names shown in the
        >> fields listed. I'm trying to do this in a text box on a report. I've
        >> done this fairly succesfully in other reports but I must have done
        >> something wrong here....
        >>
        >>
        >> I've tried both of these...
        >>
        >> =Trim([QGPL_BADGE1.OML NAM] & [QGPL_BADGE1.OMF NAM])
        >> =Trim([QGPL_BADGE1.OML NAM] &", "& [QGPL_BADGE1.OMF NAM])
        >>
        >> The fields are 25 character text fields.
        >> Any ideas?[/color][/color]

        Comment

        Working...