Extract text from <example>TEXT</example> (1 Viewer)

Gasman

Enthusiastic Amateur
Local time
Today, 10:24
Joined
Sep 21, 2011
Messages
14,267
Yes. The idea was to allow fore more <diagnose> and <resept>, but i couldnt find the way to do it. I will need to make <diagnose2>-3-4 and so on. But im guessing this is doing it way to hard.
Trying your solution for new line now
No don't have suffixes, that limits you.

Have at look at the attached and perhaps build from that.?
Not thoroughly tested mind you, but gives you something to start with.

HTH
 

Attachments

  • SplitTest.accdb
    520 KB · Views: 54
Last edited:

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 17:24
Joined
May 7, 2009
Messages
19,234
dont split yet, we havent properly introduced yet.

i added a table so it can be more realistic.

i am using Regular Expression to extract the text.
on the form's load event i am creating an instance
of it so we do not need to re-create an instance
everytime.

see the code in frmSplit events, Load(), UnLoad().
also see the function on the form, fncTagOut(),

see the ControlSource of Diagnose, and Resept.

if you need to use Bound control for Diagnose and Resept,
remove, add an Event on txtJournal's AfterEvent:
Code:
Private Sub txtJournal_AfterUpdate()
	Me.Diagnose = fncTagOut([txtJournal], "<diagnose>")
	Me.Resept = fncTagOut([txtJournal], "<resept>")
End Sub
 

Attachments

  • TheSplit.zip
    41.7 KB · Views: 59

Gasman

Enthusiastic Amateur
Local time
Today, 10:24
Joined
Sep 21, 2011
Messages
14,267
Very nice arnelgp,:cool:

For my benefit though please

1. How do you avoid the initial vbCRLF at the start of the loop.? is it the + rather than & ? What does the + actually do ?
2. Why are you using Variant when we know they will be string variables?

TIA
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 17:24
Joined
May 7, 2009
Messages
19,234
null + anything=null
null & anything = anything
 

Users who are viewing this thread

Top Bottom