Private Sub txtFirstName_Change() txtContactName = txtFirstName & "," & txtLastName End sub Private Sub txtLastName_Change() txtContactName = txtFirstName & "," & txtLastName End sub <-------------- You can also make the txtContactName visible property set to false so that the users are not even aware of the changes that you have made and keep the form design the same. [quote] >-----Original Message----- >In Access2000, I have a table which has the follwoing[/quote] fields:[quote] > >ContactName LastName FirstName >Jones, Bob Jones Bob > >Our customer service dept enters new contacts through[/quote] the use of a form.[quote] >However, they only have access to the LastName,[/quote] FirstName fields. Which[quote] >causes me to have to enter the ContactName each time a[/quote] new contact is added.[quote] >Can you please offer some assistance as to how I can[/quote] concatenate the fields,[quote] >and where I should do it in order that this will work[/quote] more smoothly?[quote] > >Does the code get written in the view or VB? > >Thanks for your help, >Gary > > >. >[/quote] [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => <30cc01c35510$acc70e30$a001280a@phx.gbl> [ref] => [htmlstate] => on_nl2br [postusername] => TK [ip] => -@- [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 1 [islastshown] => [isfirstshown] => 1 [attachments] => [allattachments] => ) --> Concatenating - Microsoft Access

Concatenating - Microsoft Access

You could try putting a text box on your form with the control source set to "ContactName" in your table. Then in VBA code, make a procedure for the change event of both the first name and last name text boxes. example---> Private Sub txtFirstName_Change() txtContactName = txtFirstName & "," & txtLastName End sub Private Sub txtLastName_Change() txtContactName = txtFirstName & "," & txtLastName End sub <-------------- You can also make the txtContactName visible property set to false so that the users are not even aware of the changes that you have made and keep the form design the same. ...

  1. #1

    Default Concatenating

    You could try putting a text box on your form with the
    control source set to "ContactName" in your table.

    Then in VBA code, make a procedure for the change event
    of both the first name and last name text boxes.

    example--->

    Private Sub txtFirstName_Change()
    txtContactName = txtFirstName & "," & txtLastName
    End sub

    Private Sub txtLastName_Change()
    txtContactName = txtFirstName & "," & txtLastName
    End sub
    <--------------

    You can also make the txtContactName visible property set
    to false so that the users are not even aware of the
    changes that you have made and keep the form design the
    same.

    >-----Original Message-----
    >In Access2000, I have a table which has the follwoing
    fields:
    >
    >ContactName LastName FirstName
    >Jones, Bob Jones Bob
    >
    >Our customer service dept enters new contacts through
    the use of a form.
    >However, they only have access to the LastName,
    FirstName fields. Which
    >causes me to have to enter the ContactName each time a
    new contact is added.
    >Can you please offer some assistance as to how I can
    concatenate the fields,
    >and where I should do it in order that this will work
    more smoothly?
    >
    >Does the code get written in the view or VB?
    >
    >Thanks for your help,
    >Gary
    >
    >
    >.
    >
    TK Guest

  2. #2

    Default Re: Concatenating

    Another strategy is to just make an Update Query. For the ContactName field
    make the UPDATE TO: [LastName] & ", " & [FirstName]

    and make the CRITERIA: Is Null.

    Then you can either run the query on your own or you can use code to run
    after a specific event, etc.

    Sean

    "Gary Nelson" <garynintegratedbook.com> wrote in message
    news:uMipKsQVDHA.2104TK2MSFTNGP10.phx.gbl...
    > In Access2000, I have a table which has the follwoing fields:
    >
    > ContactName LastName FirstName
    > Jones, Bob Jones Bob
    >
    > Our customer service dept enters new contacts through the use of a form.
    > However, they only have access to the LastName, FirstName fields. Which
    > causes me to have to enter the ContactName each time a new contact is
    added.
    > Can you please offer some assistance as to how I can concatenate the
    fields,
    > and where I should do it in order that this will work more smoothly?
    >
    > Does the code get written in the view or VB?
    >
    > Thanks for your help,
    > Gary
    >
    >

    Sean Guest

Similar Threads

  1. Concatenating strings
    By JMSB in forum Coldfusion - Getting Started
    Replies: 1
    Last Post: October 25th, 08:22 PM
  2. concatenating results in a new var
    By fu-meng in forum Coldfusion - Getting Started
    Replies: 3
    Last Post: May 27th, 06:45 PM
  3. problem concatenating
    By Ray at in forum ASP
    Replies: 2
    Last Post: July 9th, 09:25 PM
  4. Concatenating A Double
    By Ron in forum ASP.NET General
    Replies: 2
    Last Post: July 2nd, 10:16 PM
  5. Concatenating Hash's
    By Simon Strandgaard in forum Ruby
    Replies: 2
    Last Post: July 1st, 11:18 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139