GIDForums  

Go Back   GIDForums > Computer Programming Forums > Miscellaneous Programming Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 17-Dec-2007, 13:21
diggity_d diggity_d is offline
New Member
 
Join Date: Dec 2007
Posts: 2
diggity_d is on a distinguished road

Need help with all caps coding


Hello! Hope everyone is well. I'm trying to figure out how to code the following:

I need to compare the 1st 5 characters in field1 to the 1st 5 characters in field2. If they are equal, then I need to insert the result in SecondaryName field ELSE put in Name1 field. However, the comparision has to be done in all caps. So essentially, the first 5 characters in field1 and field2 will be all caps. Any ideas or suggestions????

This is what I have so far, but can't figure out the all caps part:

if the first 5 characters in ALL CAPS in Fields("NAME1") == _
first 5 ALL CAPS characters in Fields("ACCOUNT_NAME") THEN
Targets(0).Records("Contact_1").Fields("Secondary_ Name__c") else
Targets(0).Records("Contact_1").Fields("LastName")

Thanks in advance!
Diggity
  #2  
Old 22-Dec-2007, 22:27
TurboPT's Avatar
TurboPT TurboPT is offline
Regular Member
 
Join Date: Feb 2006
Location: Atlanta, GA
Posts: 952
TurboPT is a jewel in the roughTurboPT is a jewel in the roughTurboPT is a jewel in the rough

Re: Need help with all caps coding


MODERATOR: move to misc. programming?

diggity_d: Is that VB code? ...(looks similar to me, at least)

Basically, the operation would involve taking the first 5 characters [function Left()] of each string, convert that portion to uppercase [function UCase()] (I assume that the strings are NOT already in this format?) -- similar to this:
VB / Visual Basic Code:
If UCase(Left( theFirstString, 5)) = UCase(Left( theOtherString, 5)) Then
' secondary name part here
Else
'last name part here
End If
Thinking ahead, how well will this work when there are short names, such as Dan, Dave, Jan, Mark, Paul, or Walt? It might be necessary to also check the string lengths [function Len()] some(how/where) in the routine.
__________________
Use the force...read the source!!
WYCIWYG -- what you code is what you get!
 
 

Recent GIDBlogFlickr uploads of IA pictures by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Coding Contest #1 davis Miscellaneous Programming Forum 0 12-Jun-2006 08:29
i really need help in coding this applet.. i gave up !! plz help 123awd Java Forum 7 02-Nov-2005 03:33
Need help with Simple 1D Array coding project rho C++ Forum 2 27-Jun-2005 19:05
PHP/MySQL coding issue cmarti MySQL / PHP Forum 3 26-Jul-2004 08:01
Pls help in this coding. harsha C++ Forum 5 08-Apr-2004 20:48

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 05:32.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.