Results 1 to 3 of 3
  1. #1
    FreshCoder is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Posts
    1

    Extract text from <example>TEXT</example>


    Hi!
    I need help with some code. Im making a medical record and need to extract what`s between <example>TEXT</example> and put it in text boxes.


    Click image for larger version. 

Name:	patient.PNG 
Views:	17 
Size:	10.3 KB 
ID:	35574

    Code:
    Option Compare Database
    Option Explicit
    
    Private Sub txtJournal_AfterUpdate()
    
    Dim i As String
    Dim txtJournal As String
    
    For i = 1 To Len(txtJournal)
    
    If Mid(txtJournal, i, 1) = "<diagnose>" Then
    ElseIf Mid(txtJournal, i, 1) = "</diagnose>" Then
    
    Next i
    
    If Mid(txtJournal, i, 1) = "<resept>" Then
    ElseIf Mid(txtJournal, i, 1) = "</resept>" Then
    
    
    End If
    End Sub

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,540
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,974
    This thread now has 2 solutions at https://www.access-programmers.co.uk...d.php?t=301570
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Extract text from a field
    By murleyj in forum Queries
    Replies: 7
    Last Post: 04-02-2015, 02:53 PM
  2. Extract Text
    By mchadwick in forum Access
    Replies: 1
    Last Post: 11-10-2014, 02:25 PM
  3. Extract text from a certain word to the right
    By webisti in forum Queries
    Replies: 4
    Last Post: 10-23-2014, 12:18 PM
  4. Extract Text Data
    By tmcrouse in forum Queries
    Replies: 5
    Last Post: 05-25-2010, 11:34 AM
  5. extract text from memo
    By lions1855 in forum Queries
    Replies: 2
    Last Post: 05-03-2010, 07:28 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums