Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
OpenAI NewLine Char
Jerry Fowler 
       
2 years ago
I have been updating an Access Database based on your OpenAI TechHelp video. I am asking OpenAI to come up with professional letter paragraphs on different topics we supply and store them in a database.  The responses we get back from OpenAI have /n within the text, I'm assuming it is a replacement for a linefeed (?). I have tried the replace function but it never finds the /n. How can I go about replacing the /n with either a line feed or a Carriage Return & Line Feed?
Jerry Fowler OP  @Reply  
       
2 years ago
Here is a sample of the response that we get back.

Dear Potential Student,\n\nI am writing to offer guidance and insight as you contemplate pursuing a degree in Information Technology (IT). The field of IT is a dynamic and rapidly evolving industry that offers a myriad of opportunities for growth and advancement. By embarking on a journey to earn an IT degree, you are positioning yourself to be at the forefront of innovation and technological advancement.\n\nIn considering the pursuit of an IT degree, it is crucial to recognize the immense value and significance of such a credential in today's digital age. With businesses and organizations increasingly reliant on technology to drive productivity and efficiency, the demand for skilled IT professionals has never been higher. By equipping yourself with a solid foundation in IT principles, theories, and best practices, you will be well-prepared to meet the challenges and demands of the modern workforce.\n\nFurthermore, an IT degree not only provides you with technical skills and expertise but also cultivates critical thinking, problem-solving, and analytical abilities that are highly sought after in today's competitive job market. As you embark on your educational journey, I encourage you to engage with faculty, peers, and industry professionals to expand your knowledge and network within the field of IT.\n\nIn conclusion, pursuing a degree in Information Technology is a rewarding and intellectually stimulating endeavor that can open doors to a multitude of career opportunities and professional growth. I applaud your decision to pursue higher education in this field and am confident that you will find it to be a fulfilling and enriching experience.\n\nSincerely,\n[Your Name]
Richard Rost  @Reply  
          
2 years ago
Just say something like:

S = Replace(S,"\n",vbNewLine)

And make sure your field is a long text field and that you have the Enter Key Behavior set to new line in field.
Richard Rost  @Reply  
          
2 years ago
Jerry Fowler OP  @Reply  
       
2 years ago
Rick, that is exactly what I have, and the field in the table is set to long text, and the ending text still has the /n in them. Now I do not know how to set the Enter Key behavior to a new line.

Private Sub OpenAIBtn_Click()

    Dim S As String
    
    StatusBox = ""
    S = AskOpenAI(Nz(MyText, ""), BotCombo)
    S = Trim(FindBetween(S, """content"": """, "},"))
    OpenAIResponse = Replace(S, "/n", vbNewLine)

End Sub
Alex Hedley  @Reply  
           
2 years ago
/n isn't the same as \n
Jerry Fowler OP  @Reply  
       
2 years ago

Jerry Fowler OP  @Reply  
       
2 years ago
Oh crap, I've been staring at this for the whole week and never once caught that.  As soon as I changed that it worked great! thanks, Alex ever so much and thanks Rick for the quick reply.
Richard Rost  @Reply  
          
2 years ago
I saw that in your original question, I just assumed you changed it when you were typing here. :)
Jerry Fowler OP  @Reply  
       
2 years ago
And on top of it, I looked back at the original application and there already was VBA in there taking care of it. So I must have removed it somewhere along the line when updating other code. Thanks again for the extra eyes.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/8/2026 8:51:35 AM. PLT: 1s