A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Parsing a field



 
 
Thread Tools Display Modes
  #1  
Old March 7th, 2006, 04:17 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Parsing a field

I have a name field that has the following format (Lname, Fname). I need to
extract Lname from the field and put it into another field. The LEFT fn
requires I know how many charectors to use. I need to be able to parse upto
the comma and extract/copy all of that data into the new field.

any and all ideas welcome... Thanks...
  #2  
Old March 7th, 2006, 04:27 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Parsing a field

Dim P as integer
P=instr(MyName,",")
Lname = left$(MyName,P-1)

-Dorian

"RPLanWizard" wrote:

I have a name field that has the following format (Lname, Fname). I need to
extract Lname from the field and put it into another field. The LEFT fn
requires I know how many charectors to use. I need to be able to parse upto
the comma and extract/copy all of that data into the new field.

any and all ideas welcome... Thanks...

  #3  
Old March 7th, 2006, 06:00 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Parsing a field

Thanks

"mscertified" wrote:

Dim P as integer
P=instr(MyName,",")
Lname = left$(MyName,P-1)

-Dorian

"RPLanWizard" wrote:

I have a name field that has the following format (Lname, Fname). I need to
extract Lname from the field and put it into another field. The LEFT fn
requires I know how many charectors to use. I need to be able to parse upto
the comma and extract/copy all of that data into the new field.

any and all ideas welcome... Thanks...

  #4  
Old March 8th, 2006, 01:27 AM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Parsing a field

Not good at vba/sql but was able to put into access computed field name and
view in SQL. Code worked great.. thanks again....

"mscertified" wrote:

Dim P as integer
P=instr(MyName,",")
Lname = left$(MyName,P-1)

-Dorian

"RPLanWizard" wrote:

I have a name field that has the following format (Lname, Fname). I need to
extract Lname from the field and put it into another field. The LEFT fn
requires I know how many charectors to use. I need to be able to parse upto
the comma and extract/copy all of that data into the new field.

any and all ideas welcome... Thanks...

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Parsing data in memo field Ademar Running & Setting Up Queries 1 December 9th, 2005 12:42 AM
Parsing names in a field Scoop General Discussion 4 November 21st, 2005 11:53 PM
Enter text in a field and have it appear as entered elsewhere Gregory Winters General Discussion 6 November 1st, 2005 02:09 AM
Design help, please SillySally Using Forms 27 March 6th, 2005 04:11 AM
LOOKUP FOR A VALUE ON A TABLE Samora New Users 9 February 22nd, 2005 01:06 PM


All times are GMT +1. The time now is 03:23 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.