Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

How do I enclose all text entries in a column with parentheses?

Discussion in 'Information Technology' started by Ray K, Jul 28, 2006.

  1. Ray K

    Ray K
    Expand Collapse
    Guest

    The subject states the problem. The column has just last names of people
    - no spaces or commas or anything else to complicate the task. Access 2002.

    Thanks,

    Ray
     
  2. Loading...

    Similar Threads Forum Date
    Malaysia Hindus, Sikhs In Malaysia Appalled With University Textbook Ridiculing Their Faiths Breaking News Jun 14, 2016
    Hard Talk Taking One Liners Out Of Context From Gurbani To Allow Intellectual Independence? Hard Talk Apr 23, 2016
    India Protests in India Over the Desecration of a Holy Text Leave Two Dead Breaking News Oct 16, 2015
    Learn Punjabi Convert Punjabi text Language, Arts & Culture Oct 11, 2013
    Sikh Coalition Harmeet Kaur Took the Lead ! First to Respond to Textbook Challenge ! Sikh Organisations May 25, 2013

  3. Douglas J. Steele

    Douglas J. Steele
    Expand Collapse
    Guest

    Sorry, but the subject's not sufficient.

    Where is this column? Where do you want the parentheses-enclosed results?

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no private e-mails, please)


    "Ray K" <raykosXXX@optonline.net> wrote in message
    news:IEpdg.28$CP6.7@fe08.lga...
    > The subject states the problem. The column has just last names of people -
    > no spaces or commas or anything else to complicate the task. Access 2002.
    >
    > Thanks,
    >
    > Ray
     
  4. Ricter

    Ricter
    Expand Collapse
    Guest

    Re: How do I enclose all text entries in a column with parentheses

    Private Sub myField_AfterUpdate()
    myField = "(" & myField & ")"
    End Sub


    "Douglas J. Steele" wrote:

    > Sorry, but the subject's not sufficient.
    >
    > Where is this column? Where do you want the parentheses-enclosed results?
    >
    > --
    > Doug Steele, Microsoft Access MVP
    > http://I.Am/DougSteele
    > (no private e-mails, please)
    >
    >
    > "Ray K" <raykosXXX@optonline.net> wrote in message
    > news:IEpdg.28$CP6.7@fe08.lga...
    > > The subject states the problem. The column has just last names of people -
    > > no spaces or commas or anything else to complicate the task. Access 2002.
    > >
    > > Thanks,
    > >
    > > Ray

    >
    >
    >
     
  5. Ray K

    Ray K
    Expand Collapse
    Guest

    Douglas J. Steele wrote:
    > Sorry, but the subject's not sufficient.
    >
    > Where is this column? Where do you want the parentheses-enclosed results?
    >

    Column N contains just a list of last names, with the first letter
    upper-case. All I want to do is keep each name in its present cell, but
    enclose it within parenthesis. For example:

    Presently: Row 5, column 2 = Smith
    Desired change: Row 5, column 2 = (Smith)

    Ray
     
  6. Ray K

    Ray K
    Expand Collapse
    Guest

    Ray K wrote:

    > Douglas J. Steele wrote:
    >
    >> Sorry, but the subject's not sufficient.
    >>
    >> Where is this column? Where do you want the parentheses-enclosed results?
    >>

    > Column N contains just a list of last names, with the first letter
    > upper-case. All I want to do is keep each name in its present cell, but
    > enclose it within parenthesis. For example:
    >
    > Presently: Row 5, column 2 = Smith
    > Desired change: Row 5, column 2 = (Smith)
    >
    > Ray


    I just found that if I copy the database into an Excel spreadsheet, I
    can add a new column and in each of its cells use a formula to
    concantenate a left parenthesis with the last name and with a right
    parenthesis. Each cell of the new column (call it column C) has a
    formula like this, where A2 and A3 are cells with the last names:

    C2="("&A2&")"
    C3="("&A3&")"

    Ray
     
  7. Douglas J Steele

    Douglas J Steele
    Expand Collapse
    Guest

    "Ray K" <raykosXXX@optonline.net> wrote in message
    news:p0udg.142$CP6.9@fe08.lga...
    > Douglas J. Steele wrote:
    > > Sorry, but the subject's not sufficient.
    > >
    > > Where is this column? Where do you want the parentheses-enclosed

    results?
    > >

    > Column N contains just a list of last names, with the first letter
    > upper-case. All I want to do is keep each name in its present cell, but
    > enclose it within parenthesis. For example:
    >
    > Presently: Row 5, column 2 = Smith
    > Desired change: Row 5, column 2 = (Smith)


    "Row n, Column m" is meaningless when talking about relational databases.

    If all you want are the parentheses for display purposes, change the
    ControlSource for the text box that currently displays the value from
    whatever it is (say, for the sake of illustration, LastName) to ="(" &
    [LastName] & ")" (including the equal sign). It won't be possible, of
    course, to make changes to that field anymore.

    Ricter's suggest might work (although I'd put it in the BeforeUpdate event,
    not the AfterUpdate event), but you'd have to remember to remove the
    parentheses if you're editting the field.

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no e-mails, please!)
     
  8. Ray K

    Ray K
    Expand Collapse
    Guest

    Douglas J Steele wrote:
    > "Ray K" <raykosXXX@optonline.net> wrote in message
    > news:p0udg.142$CP6.9@fe08.lga...
    >
    >>Douglas J. Steele wrote:
    >>
    >>>Sorry, but the subject's not sufficient.
    >>>
    >>>Where is this column? Where do you want the parentheses-enclosed

    >
    > results?
    >
    >>Column N contains just a list of last names, with the first letter
    >>upper-case. All I want to do is keep each name in its present cell, but
    >>enclose it within parenthesis. For example:
    >>
    >>Presently: Row 5, column 2 = Smith
    >>Desired change: Row 5, column 2 = (Smith)

    >
    >
    > "Row n, Column m" is meaningless when talking about relational databases.
    >
    > If all you want are the parentheses for display purposes, change the
    > ControlSource for the text box that currently displays the value from
    > whatever it is (say, for the sake of illustration, LastName) to ="(" &
    > [LastName] & ")" (including the equal sign). It won't be possible, of
    > course, to make changes to that field anymore.
    >
    > Ricter's suggest might work (although I'd put it in the BeforeUpdate event,
    > not the AfterUpdate event), but you'd have to remember to remove the
    > parentheses if you're editting the field.
    >

    Doug,

    Thanks for the suggestion. As my message of 12:31 a.m. shows, I've found
    how to do it easily using Excel.

    Ray
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page