proper name conversion

I have a database that has names of people in one field, 
in a last name, first name order. (example: Smith, John)  
How can i seperate the last and first names from one text 
field into two different fields?  Or at least have only 
the last name.  thanks for any help.
0
Howard
2/25/2004 9:26:23 PM
access.conversion 3038 articles. 0 followers. Follow

1 Replies
698 Views

Similar Articles

[PageSpeed] 10

Howard wrote:

>I have a database that has names of people in one field, 
>in a last name, first name order. (example: Smith, John)  
>How can i seperate the last and first names from one text 
>field into two different fields?  Or at least have only 
>the last name.  thanks for any help.
>  
>
This is air code. It is looking for a space between the last name and 
the first name.

Dim x As Integer
Dim fName As String
Dim LName As String
 x = InStr(1, rs!Name, " ")
 fName = Right(rs!Name, Len(rs!Name) - x + 1)
 LName = Left(rs!Name, x - 1)

If you were looking for the comma then it would look like this.

Dim x As Integer
Dim fName As String
Dim LName As String
 x = InStr(1, rs!Name, ", ")
 fName = Right(rs!Name, Len(rs!Name) - (x + 2))   
 LName = Left(rs!Name, x - 1)

Ron

-- 
Ronald W. Roberts
Roberts Communication
rwr_at_robcom_dot_com@robcom.com
To reply remove "_at_robcom_dot_com"

0
Ronald
2/25/2004 9:42:53 PM
Reply:

Similar Artilces:

Last User Name
Is it possible to remove last user name from GP Login Screen and make it blank? Thanks! Hi Create_Share Open the DEX.INI file (Located in the GP install folder) and remove the line: SQLLastUser= This will remove the name going forward and leave the field blank. Fliehigh "create_share" wrote: > Is it possible to remove last user name from GP Login Screen and make it > blank? > > Thanks! > It will just add the line again the next time the software is closed. You can take that line out and make the file read only, but that can mess on some other procedur...

PST2GB
I tried to use PST2GB to truncate my outlook.pst file but when running I received an error message to correct a file name - but no other information. The program will not run beyond this point. How do I determine which file name is a problem and the correction. ...

Hiding a userform properly!
Please take a look at the code below which my workbook is using: '-------------------------------------------------------- Private Sub Workbook_Open() Userform1.Show End Sub '------------------------------------------------------- Private Sub UserForm_Initialize() MsgBox "Initialize stuff here" Userform1.Hide MsgBox "Okay, form1 is hidden now!" Userform1.Show End Sub '-------------------------------------------------------- So....obviously this code will not work. I'm guessing that the second call to "Userform1.Show...

expanding newsgroup conversations
How can I get Windows Live Mail to expand all newsgroup conversations automatically? __________ Information from ESET NOD32 Antivirus, version of virus signature database 4961 (20100320) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com "zev" <zev_horn@yahoo.com> wrote in message news:emgOUfHyKHA.5364@TK2MSFTNGP05.phx.gbl... > How can I get Windows Live Mail to expand all > newsgroup conversations automatically? If you don't see the menu bar (File|Edit|View|Go|Tools|Actions|Help) then press ALT-M to display i...

File names and locations
I'm new to Outlook and have loaded it onto a new computer running Windows 7 so that I can sync my Blackberry to it. I am going to install it on to another XP machine and would like to be able to copy the files for the contacts, calendar, email folders, etc to the new machine. Can anyone tell me the file names and possible locations that I would need to move the data to another machine? Thanks, Rick Morrison Look for pst-files. You can look up your currently connected pst-files and their paths via; File-> Data File Management... For transferring details se...

Changing Company Name Means Changeing Domain Name
Our Company Name is changing. And they have asked me to Chang the Name of our Windows 2000 Domain Name. Specifically they want our logins to chang from tom@oldcompanyname.com to tom@newcompanyname.com . And email to change from tom@oldcompany.com to tom@newcompany.com This looks like a pretty large task. Please fill in the blanks I am missing: 1. Remove all computers/resources from the oldcompany.com domain. 2. Demote both Domain Controllers. 3. Promote the DC's as Domain Controllers with the new Domain Name: Newcompany.com 4. Configre DNS to support the required domains. 4. Join t...

Range name applies to list, or simply range?
In Excel 2003, if I go through the pull-down menus to define a range name, I can see the bounding spreadsheet coordinates for the various named ranges. (Don't have access to the machine with Excel at the moment, so sorry if this is a bit vague, but I think the menu traversals might be something like Insert->Name->Define). Is there a way to determine whether the names apply to a simple range, or a list? Currently, my way of testing that is to insert rows into a list and see whether the range coordinates for the list name changes. There must be a more direct way than to muss around ...

Series name #2
When I select data for a chart, excel does not use the top row as series names (in fact uses them as values - they are text identifiers such as 7004, 7005, etc. but I have formatted as text). I can not select top row and put Series names in one by one, but I have 54 series! Do I have some option turned off? Clear the cell in the top left of the range (above the X values and left of the series names). Then make the chart. The blank cell indicates to Excel that the top row and first column are special, so it can parse the range properly. - Jon ------- Jon Peltier, Microsoft Excel MVP...

Images with transparent areas don't print properly.
I have a project to make an A4 poster with Images and text. 2 of the images have transparent backgrounds created in an imaging package (Paint Shop Pro) as .PNG files. When I insert these images into the Project they display fine but don't print properly - only a vague outline of the darker parts print. However on Print Preview the document looks perfect. The other non-transparent area images on the page print fine. I am using Publisher 2003 on Windows XP Pro printing to a networked OKI C5200N Colour laser printer on A4 size. What could be wrong here? I would suspect the printe...

Domain Name Conflict in Running ADC
We have a domain named "Cornerstone" and email comes to us at cornerstonegrp.com What happens when we merge 5.5 into AD? I would imagine nothing of consequence. But what do you mean "merge"? "jhkadmin" <jhkadmin@discussions.microsoft.com> wrote in message news:7523C12C-790F-4E7C-8A30-FBDD23936B23@microsoft.com... > We have a domain named "Cornerstone" and email comes to us at > cornerstonegrp.com > > What happens when we merge 5.5 into AD? martin, Thanks for the reply. The atributes of users in Exchange 5.5 get moved into AD ...

Sheet name
I want to change this from the Master sheet to the active sheet MyConstant = Application.CountA(Sheets("Master").Range("A2:I31")) On Sat, 12 Dec 2009 12:08:01 -0800, oldjay <oldjay@discussions.microsoft.com> wrote: > >I want to change this from the Master sheet to the active sheet > >MyConstant = Application.CountA(Sheets("Master").Range("A2:I31")) Try this: MyConstant = Application.CountA(ActiveSheet.Range("A2:I31")) Hope this helps/ Lars-�ke Try this... MyConstant = Application.CountA(ActiveShee...

Automatic Name Checking Quit Working
When it rains it pours...another Outlook issue! Running XP at home and have been using Automatic Name Checking (not Suggest Name) forever. Now all of a sudden even with the option checked, it no longer gives me email addresses at all. It just stays the way I typed and opens the address book to choose a name when I send. I haven't changed anything in Outlook in months. Any suggestions?? Thanks!! -- Remove 'spam' from email address to contact me directly Sounds like something reset your NK2 cache. You're sure you changed nothing? What happens when you resolve a name ma...

PROPER
I need to change the info in a column. Right now it is all uppercase and I need for it to be like a PROPER name. I tried the PROPER function and that is not working. I need to do the complete column. I am a novice at excel. Please help If the data is in A1, =PROPER(A1) and copy down, Regards, "Annie B" <anonymous@discussions.microsoft.com> wrote in message news:3b8e01c4a4be$c8587b80$a401280a@phx.gbl... > I need to change the info in a column. Right now it is > all uppercase and I need for it to be like a PROPER name. > I tried the PROPER function and that is...

Data file did not close properly #2
I have read all kinds of solutions to this error. Has any thing difinitive been offered that solves the problem. Appreciated Jerry There isnt a difinative solution as the problem can be caused by a number of differing things "Jerry" <jerry@home.home> wrote in message news:eRfw6Cs1IHA.5300@TK2MSFTNGP06.phx.gbl... >I have read all kinds of solutions to this error. Has any thing difinitive >been offered that solves the problem. Appreciated > > Jerry > "Jerry" <jerry@home.home> wrote in message news:eRfw6Cs1IHA.5300@TK2MSFTNGP06.phx.gbl...

AutoFilter to Named Range
I have a sheet of data I want to programatically filter (by track) into subsets and assign the filtered data to named ranges. Sample data: Track PosX PosY 4 33 41 2 19 73 2 21 68 4 36 38 6 83 12 4 35 38 4 36 40 6 81 14 2 23 67 So, for example, a named range "track4" would consist of all the PosX and PosY data corresponding to track4. Can anyone suggest some code to start with? How about this: Option Explicit Sub te...

Number Format Problem Prevents Proper Sorting #2
I copied the values into a new column and pasted them "special" and it worked. Thanks for your assistance. Vic -- 65Stang ------------------------------------------------------------------------ 65Stang's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=15008 View this thread: http://www.excelforum.com/showthread.php?threadid=275679 Thanks for the feedback. Glad to help. Mike "65Stang" wrote: > > I copied the values into a new column and pasted them "special" and it > worked. > > Thanks for your assistance. &g...

Display Name Resolution situation
I have a situation with three internal Exchange mailboxes: MB1 = Mike - sent a message to Sarah MB2 = Sarah - Sarah did not receive the message MB3 = John - John received the message In John's mailbox, the To field shows the following: Sarah (sarah@domain.com) But when you right-click on "Sarah (sarah@domain.com)" and choose Properties, you see all the GAL information for John's mailbox. None of the mailboxes have have anything in their contacts folders, nor do we have any Public folder contacts. It is my understanding that whenever a message is delivered ...

PROPER function
Hi all - Stupid me, maybe, but I can't get this function to work. The help file says: "PROPER (text) Text is text enclosed in quotation marks, a formula that returns text, or a reference to a cell containing the text you want to partially capitalize." So the text I want to convert is in cell, say, I370. In helper cell J130 I enter =PROPER(I370) But all I get in cell J130 after hitting enter is =PROPER(I370). In other words, it doesn't seem to be acting as a formula --- it is just appearing literally. This is an inherited spreadsheet, so it's possible something ...

=PROPER
Using Excel 2003. Have downloaded info and it was downloaded in all caps. Have tried to use the =PROPER formulat but it doesn't work. If I go to a separate cell in the spreadsheet referencing a specific cell it works. How can I change in one worksheet all caps to PROPER ? How are you using =PROPER? It's designed purpose is to be used in a different cell --- for example your information is in Cell C5 then in D5 you may put =PROPER(C5). Then in D5, you would have the information from C5 with PROPER capitalization "Snowcap" <Snowcap@discussions.microsoft.com...

The data file was not closed down properly
I am running Office 2007 and recently upgraded to Windows 7. Ever since I have upgraded (I think) I am getting the error 'The data file was not closed properly. Checking for problems'. This eventually resolves itself. I know that I have closed it down correctly. Any suggestions? I have checked the Add-Ins, and the only ones that are left weem to be official MS ones Are you syncing with a smartphone or ipod? Using any software that accesses outlook data, like desktop gadgets? -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outloo...

Global Name Change
Is there a global way to change the ALIAS of all users within Exchange 2003/AD 2003. we would like to change the users name from johsmi (John Smith) to jsmith (first initial and last name). I know it can be done for new users through a recipent policy but we want to change all exsisting users. Thanks in Advance ...

Want to Move exhcnage to a new server with different name
I have Exchange 2003 Enterprise running on an older box. Bought a new Box to Host Exchange. I have not been able to find articles that step by step describe moving an exchange server to a new box with a new name. My Data Store is now approching 38GB (yes, thats right). would someone please point me in the right direction. I don't mind doing the reading, just need to know where to look. Microsoft Exchange Server 2003 ( Administrators Pocket Consultant is no help ) Petri.co.it is a help, but not on this topic. This should be an easy task, just name the machine, join the machine to th...

Get Contact name using SDK
Hi All, Can anybody teel me what am i doing wrong in the below code? It gives me error at the for each lop that Value for type "crmsdk.BusinessEntity" can not be converted to crmsdk.contact. This code works fine if i use any entity other than contact. Is this a bug or i ma doing somethig wrong? Also code works fine in c# as well with contact entity. Only in vb.net it it giving problem. Please help. This is very very urgent. thanks in advance. ID = Request.QueryString("id") If ID = "" Then ID = "402836DB-91AA-DA11-AB00-00034...

Publisher 2003
Hi, I'm trying to create a membershipcard with publisher. I used a mail merge to create all the cards with different names and picuters. On the screen everything looks fine. I want to have multiple cards on one page with a total of eight per page. When looking at the print preview every card shows the same name. I read about the bug with the preview so I printed some pages. Now I get a page full of cards with the same name and then a page with the second name in all the cards and so on. What am I doing wrong? Maarten Maarten <rijt@dse.nl> was very recently heard to utter: ...

The proper way...
What's the proper way to exit an MFC/C++ application? I have the Exit button and when the user clicks on it I ask him (with MessageBox) 'Are you sure?' and then I call PostQuitMessage(WM_QUIT). The problem is that when I'm in debbug mode and after that operation, the debbug window says that there is alot of memory leaks (in almost every object), but when I close my application with ALT+F4 there is no memory leaks? How do you exit your applications? Thanks for replying! On Mon, 22 Jan 2007 07:04:00 +0100, "blue" <blue@blue.blue> wrote: >What's t...