473,586 Members | 2,491 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting syntax error while trying to replace new lines in one field in access

1 New Member
Expand|Select|Wrap|Line Numbers
  1. UPDATE Employer SET Employer.17-Comments = Replace([17-Comments],Chr$(13) & Chr$(10)," ");
it is giving syntax error at "-". In Design view the field is showing as "17-Comments). Hence used - with field name
Jul 14 '15 #1
2 1058
Rabbit
12,516 Recognized Expert Moderator MVP
You need to use square brackets to delineate column names if you're using non-standard characters in the column name. Otherwise, it thinks you're trying to subtract a column named 17 and a different column named Comments
Jul 14 '15 #2
NeoPa
32,566 Recognized Expert Moderator MVP
As Rabbit says. Try :
Expand|Select|Wrap|Line Numbers
  1. UPDATE [Employer] SET [17-Comments]=Replace([17-Comments],Chr(13)+Chr(10),' ')
Jul 15 '15 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

8
4501
by: middletree | last post by:
What's wrong with this code? strLongDesc = Replace(Replace(Replace(Replace(Trim(Request.Form("LongDesc")),"'","''"),vbC rLf,"<br>"),"<",&lt;),"<",&gt;) Background: This field is a textarea, and I needed to account for apostrophes, which I had already done, and replaced line breaks with html line breaks on my page which displays this stuff....
2
9285
by: Roy Rodsson via .NET 247 | last post by:
Hi all! I am using a stored procedure in SQL2000 for retrieving fileinformations from a db. the table as an uniqueidentifier for the file information. The stored procedure has a variable called fileIds that is oftype varchar. I am putting in a comma separated string with ids (such...
18
3772
by: rahuls | last post by:
Hi everyone, I have a couple of questions? 1.this is part of my main function ////////////////////////////// int main() { FILE *f1; int i,j; j=100000000; int intData;
1
1611
by: klove1209 | last post by:
Good afternoon, I am currently working on this unbounded form that has numerous date fields. I wanted to know if it is possible to save data in a form, with a null date field. I am currently getting an error, and would like to know if there is a way around it. I am doing this feature just in case users do not need to enter a date for a...
0
1249
by: emrodge | last post by:
Hi, Any help appreciated on this one. I've set up a simple database with 4 tables & 3 forms. The tables link together on a field called "client id" which is the ID in a table called "Clients". I am trying to write some code behind a button on a form called "Membership & Fee Stats" which navigates to the associated Client record on the Clients...
7
2838
by: Yesurbius | last post by:
I am receiving the following error when attempting to run my query. In my mind - this error should not be happening - its a straight-forward query with a subquery. I am using Access 2003 with all the latest patches. If I do not group the query (ie. remove aggregation) it will work. If I recall, it also works if my subquery does not have...
0
1423
by: dougancil | last post by:
I have the following code: Imports System.Data.SqlClient Public Class Main Protected WithEvents DataGridView1 As DataGridView Dim instForm2 As New Exceptions Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles startpayrollButton.Click Dim ssql As String = "select...
1
7460
by: mertsenel | last post by:
if (comboBox1.Enabled == true && textBox5.Text != "") { OleDbConnection con = new OleDbConnection(); con.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;" + @"Data Source= c:\users\mert\" + @"documents\visual studio 2010\Projects\PayrollCS\WindowsFormsApplication7\PayrollDB.accdb"; ...
6
2100
by: ahakrush | last post by:
hey, i have been writing this code (C++) in the last week, i have many classes in the .h file, but one problem with one class, which is: ___________________________________________________________ 35 template <int size=10> 36 class Picture 37 { 38 vector<Shape*> vec; 39 40 public:
0
7915
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8204
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8339
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7965
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
3838
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3869
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1184
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.