Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

combo box value has % % in the data causing problems

Status
Not open for further replies.

ggreg

Programmer
Mar 9, 2001
201
US

How can I rewrite the following line to allow % as a value in the data:

SQL_Text = SQL_Text & Me.Combo70.Column(1) & " "


Below is the full line of code


SQL_Text = SQL_Text & "INSERT INTO rq_requisition ([Description], [Price], [Object],
, "
SQL_Text = SQL_Text & "[Department], [Product], [Project], [Activity], [Comments]) VALUES( '"
SQL_Text = SQL_Text & Description1 & " " & Description2 & "',"
SQL_Text = SQL_Text & Me.subformpoinv.Form.AMOUNT & ","
SQL_Text = SQL_Text & Obj & ","
SQL_Text = SQL_Text & Center & ","
SQL_Text = SQL_Text & Orgn & ","
SQL_Text = SQL_Text & Actv & ","
SQL_Text = SQL_Text & "800" & Project__ & "0000" & ","
SQL_Text = SQL_Text & Product & ","
SQL_Text = SQL_Text & Me.Combo70.Column(1) & " "
SQL_Text = SQL_Text & ")​
 
Change
Code:
SQL_Text = SQL_Text & Me.Combo70.Column(1) & " "
...to
Code:
SQL_Text = SQL_Text & """" & Me.Combo70.Column(1) & """ "
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top