Do not use on any
shared computer
September 5, 2008 10:18pm pdt
 
[x]
Attachment Details

insert into table won't allow a string variable's value  to be inserted

Tags: Microsoft, Access, 2003, remove special characters
Hi,
I have a huge text file which I have split into multiple variables, and now I need to be able to put them into a table.  Some of the lines cause changes in the values of some variables, and that seems to be going okay.  

However, I just ran across a line that has some text//text, and although the variable contains that, I cannot get it to go into the field.  Here is the values portion (or some of it).  

,  ' " & strcomplaint & " ',  ' " & strphysician & " ',      Is there something I can put here, around strcomplaint to make it accept the value with the // in the middle?  Do I have to split that out?  What is in there is fine with the //s.  
Susan

Start your free trial to view this solution
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Question Stats
Zone: Microsoft
Question Asked By: skennedy10
Solution Provided By: harfang
Participating Experts: 4
Solution Grade: A
Views: 0
Translate:
Loading Advertisement...
 
[+][-]Expert Comment by dqmq

Rank: Master

Expert Comment by dqmq:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Expert Comment by Emil_Gray
Expert Comment by Emil_Gray:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Expert Comment by frankytee

Rank: Guru

Expert Comment by frankytee:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Expert Comment by frankytee

Rank: Guru

Expert Comment by frankytee:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Accepted Solution by harfang

Rank: Wizard

Accepted Solution by harfang:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by skennedy10
Author Comment by skennedy10:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
Open Discussion
Open Discussion
 
Comment by harfang
Thanks! As a matter of fact, I did read your question, but knew that // wasn't the issue... so I wrote about single quotes instead on a hunch...
Success with your project!
(°v°)
 
 
Comment by skennedy10
You do answer my questions pretty often!  Thank you!  

I would be nowhere without EE and all of you Experts!

You really don't think the // was a problem?  I know a single one is OK, but that was the record and the part of the record that was hanging, as I stepped through it in the immediate window.  I did later find a name with an apostrophe in it, so I took care of that, but that was not what stopped the processing!  

Thanks!
Susan
 
 
Comment by harfang
You are welcome!

In some programming languages the \ has a special meaning, but not in VB or Jet's SQL. I don't know a language where / is special. I think something else must have stopped the processing: a single quote in that record, a field being too long, or anything else. Anyway, this has solved the problem, right?

(°v°)
 
 
Comment by skennedy10
Right.  I am writing a program for use in medical billing of several hospitals' emergency rooms, and some person writes in the complaint, patient's name, etc.  This is where the entry was made.  "congestion //can't breathe.  Well, maybe it was the apostrophe, now that I am writing this.  I don't remember if  it (apostrophe) was there or not (I will check on Monday when I can access that record again, though).  I have no control over what they write, and I am writing a program for an end-user, not myself.  I don't want them to have to proofread a 500-line text single field document to find the "problems" before they enter this routine.  

I think I put both the ' and the // replace routines on those two fields, so the ' would have caught that ', if there was one.  I just cannot remember.  HIPAA keeps me from bringing that home.  

My program finds dates, keeps one until another similar format is found with a new date, and puts the date on all of the lines in between two different dates.  

It has to split this original .txt file into lines and into fields, which, thank goodness, are always typed into a fixed-length field in the ER.  

I have learned so very much from all of you at EE that I am able to get a great job in this field which will carry this old retired teacher until and past my "next retirement"!  

Thanks, EE responders, all of you, including Harfang!  I was upset when someone posted on something I saw last week that they thought $10/month was really a high price.  Oh, sooooo wrong!  
Susan

 
 
Comment by harfang
Thank you for that, and again: success with your new career!
(°v°)
 
 
20080723-EE-VQP-34 / EE_QW_2_20070628