Space between fields

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

    Space between fields

    Frinds, I am creating a form which exports and prints data to a Word
    file named FORM1.
    This word file has some fields which I have bookmarked and one of its
    fields is named NAME.

    The code that export the Access data to my bookmarked Word fields is:

    ..Selection.Got o wdGoToBookmark, Name:="NAME"
    ..Selection.Typ eText rstCases!FIRSTN ame & " " & rstCases!LASTNa me

    You will notice that my code exports two Access fields named FIRSTName
    and LASTName.

    Two are the problem I am having.
    1) Whan I export the data, the first and last name are concatenated. I
    would like to give a space between the first and last name. I have
    tried to add a comma (,) in between the " " but it does not work.

    2) My second problem is despite my Access fields are simply text field
    with a CAPITOL LETTER format (>) when I export the data, it is shown
    in small letters.

    Any help?

    Thanks.
  • Phil Stanton

    #2
    Re: Space between fields

    I have found problems in access calling fields "Name". Suggest using
    "WholeName" or something similar.

    Try
    Dim WholeName as String
    WholeName = UCase(rstCases! FIRSTName & ", " & rstCases!LASTNa me)
    That should do the concatenation and convert to upper case
    Then
    .Selection.Type Text WholeName

    Phil


    "Paolo" <jprma@tin.it > wrote in message
    news:9f41a860.0 310230422.5188a 0dd@posting.goo gle.com...[color=blue]
    > Frinds, I am creating a form which exports and prints data to a Word
    > file named FORM1.
    > This word file has some fields which I have bookmarked and one of its
    > fields is named NAME.
    >
    > The code that export the Access data to my bookmarked Word fields is:
    >
    > .Selection.Goto wdGoToBookmark, Name:="NAME"
    > .Selection.Type Text rstCases!FIRSTN ame & " " & rstCases!LASTNa me
    >
    > You will notice that my code exports two Access fields named FIRSTName
    > and LASTName.
    >
    > Two are the problem I am having.
    > 1) Whan I export the data, the first and last name are concatenated. I
    > would like to give a space between the first and last name. I have
    > tried to add a comma (,) in between the " " but it does not work.
    >
    > 2) My second problem is despite my Access fields are simply text field
    > with a CAPITOL LETTER format (>) when I export the data, it is shown
    > in small letters.
    >
    > Any help?
    >
    > Thanks.[/color]


    Comment

    Working...