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....

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"

salam brother i need some help in vc6 can u.i m new in this community.

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 );
	}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.