473,320 Members | 2,000 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

expected; end of statement

DoCmd.RunSQL "update tblexam set sno=sno-1 where subcode = DLast("subcode", "tblexam", "subcode='" & Me.subcode & "'") "
please help me
May 1 '07 #1
4 3017
put a semicolon before the last double quote
May 1 '07 #2
sir,
compile error expected:end of statement
DoCmd.RunSQL "update tblexam set sno=sno-1 where subcode = DLast("subcode", "tblexam", "subcode='" & Me.subcode & "'") "
Even when i put semicolon at the end before the last double quote ,it is giving same error
May 1 '07 #3
Denburt
1,356 Expert 1GB
Try this:

DoCmd.RunSQL "update tblexam set sno=sno-1 where subcode = DLast('subcode', 'tblexam', subcode='" & Me!subcode & "')"
May 1 '07 #4
Denburt
1,356 Expert 1GB
Sorry, to help you understand what you originally posted had open quotes then closed them without reopening them esentially ending the statement here like so

DoCmd.RunSQL "update tblexam set sno=sno-1 where subcode = DLast("

Access just had no idea what you were doing with the rest of it and so you ended up with several errors/issues.

as an alternate:

DoCmd.RunSQL "update tblexam set sno=sno-1 where subcode = DLast(""subcode"", ""tblexam"", subcode='" & Me!subcode & "')"
May 1 '07 #5

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

Similar topics

1
by: Phil Powell | last post by:
Here is the function ArraySearch: '-------------------------------------------------------------------------------------- 'ArraySearch will return an integer value indicating the first...
7
by: Graham James Campbell CS2000 | last post by:
Having a nightmare problem with this and would appreciate any and all help. The situation is I want to move from a webform and format the user inputted text into some html I am storing in a...
3
by: Matt | last post by:
When the ASP statement end with a _ character, then the next line cannot have comment ' character. Is that correct? Since I encountered the following error: Microsoft VBScript compilation...
5
by: andy.herrera | last post by:
I'm getting this Error Message. Expected ';' Please Select One: <form name="form1"> <<------------ Error is here. <select name="selectTrans" onChange="If (this.value == 'checkout')...
2
by: Edward S | last post by:
I would appreciate if someone could correct my SQL statement which is displaying a message Expected : End of Statement this statment is attached to a button on the form StrSQL = "PARAMETERS !!...
3
by: NeilH | last post by:
Hello All I was wondering if someone could offer a rather inexperienced person some advice. Im trying to get my asp page to look at an access data I created the following query in access...
35
by: Marchel | last post by:
For a long time I was a gib fan of Borland C++ Builder with VCL framework and never gave a second look in Microsoft products since I've seen MFC. Anyway, recently Borland decided out of the blue to...
39
by: eruanion | last post by:
Hi, I've been working on this for a while now and I can't seem to find out what is wrong with my code. I have 2 files one c3common.js which only contains javascript functions for my main html page...
3
by: eBob.com | last post by:
I've done a lot of programming but very little OOP. Would someone be kind enough to explain to me why I get a "declaration expected" on this statement: anythingarray(0) = new anything(3) ...
1
by: nosaj070 | last post by:
Hi, I'm working on a project and it is my first time implementing VBA with Access. I know my SQL Statement is close, but it obviously isn't perfect, if any of you can see what the error is I'd really...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.