User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 361,609 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,125 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser:
Views: 414 | Replies: 3
Reply
Join Date: Dec 2007
Posts: 8
Reputation: mrt.work is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
mrt.work mrt.work is offline Offline
Newbie Poster

Ms Access cut string

  #1  
May 11th, 2008
Hi, i'm using ms access and i have a table and a form which have the field code_url. I would like to know how can i create a form with a button that i could use to cut string in the field name code_url for example:

<a href="yahoo.com?234234234sdef">Episode 1</a><br><embed src="videos/vplayer.swf

i want to delete the first href code from this string, starts from <a to </a>, so the result would be:
<br><embed src="videos/vplayer21212.swf
i want to know how to use it in form with button for individual row cut and with query for mass cuts. I really have no idea how this works.

Any response, thanks in advance....
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2008
Posts: 2
Reputation: عبدالباري is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
عبدالباري عبدالباري is offline Offline
Newbie Poster

Re: Ms Access cut string

  #2  
May 14th, 2008
foe example in form1 contain tow Text box
Text1="abdulbary algrady"

and you want to cut the string to Text2
use
this cod
Private Sub Command1_Click()
Text2.Text = Left(Text1.Text, 11)


End Sub
text2 will be equal="algrady"
Reply With Quote  
Join Date: May 2008
Location: PAKISTAN
Posts: 1
Reputation: sanaullah is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
sanaullah sanaullah is offline Offline
Newbie Poster

Re: Ms Access cut string

  #3  
May 17th, 2008
salam brother i need some help in vc6 can u.i m new in this community.
Reply With Quote  
Join Date: Feb 2008
Location: Sivakasi, Tamilnadu, India
Posts: 199
Reputation: selvaganapathy is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 32
selvaganapathy's Avatar
selvaganapathy selvaganapathy is offline Offline
Junior Poster

Re: Ms Access cut string

  #4  
May 18th, 2008
Hi
Here VC++6 code to extract the string
        CString s = "<a href=\"yahoo.com?234234234sdef\">Episode 1</a><br><embed src=\"videos/vplayer.swf\"";
	CString cut;
	int index =	s.Find("</a>");		// Find </a> index

	if ( index >= 0 ){				// If Found
		cut = s.Mid ( index  + 4 );  // Index + Length of </a>
		AfxMessageBox ( cut );
	}
Last edited by selvaganapathy : May 18th, 2008 at 12:40 am.
KSG
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Visual Basic 4 / 5 / 6 Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum

All times are GMT -4. The time now is 5:47 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC