?
Solved

Syntax for SQL

Posted on 2006-03-27
2
Medium Priority
?
160 Views
Last Modified: 2010-05-01
This statement needs to read [Desicioned by Mandatory] =[" "]
(Blank)

Any help would be appreciated!


 sql = "update [Roll Exception Report] set [Desicioned by Mandatory] =[" "] where  [company number] = " & Me.[Text38]
CurrentDb.Execute sql, dbFailOnError
0
Comment
Question by:ca1358
  • 2
2 Comments
 
LVL 19

Expert Comment

by:dmitryz6
ID: 16306864
if company number is numeric

sql = "update [Roll Exception Report] set [Desicioned by Mandatory] ="" where  [company number] = " & Me.[Text38]

if company number is string

sql = "update [Roll Exception Report] set [Desicioned by Mandatory] ="" where  [company number] = """ & Me.[Text38] & """"
0
 
LVL 19

Accepted Solution

by:
dmitryz6 earned 2000 total points
ID: 16306872
typo to single quotes '  '

if company number is numeric

sql = "update [Roll Exception Report] set [Desicioned by Mandatory] ='' where  [company number] = " & Me.[Text38]

if company number is string

sql = "update [Roll Exception Report] set [Desicioned by Mandatory] ='' where  [company number] = """ & Me.[Text38] & """"

or to make it null

sql = "update [Roll Exception Report] set [Desicioned by Mandatory] = Null where  [company number] = " & Me.[Text38]


if company number is string

sql = "update [Roll Exception Report] set [Desicioned by Mandatory] =Null where  [company number] = """ & Me.[Text38] & """"

 
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month6 days, 20 hours left to enroll

592 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question