473,386 Members | 1,764 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,386 software developers and data experts.

EVERY "on open" gives "expected end of statement" error-->SOLUTION!


Wanted to share a solution to something which I didn't find on the net:

EVERY form in my Microsoft Access 2002 database gave an error any time any
code was to be called: form OnOpen, button OnClick, etc.

Error was: <b>The expression On Open you entered as the event property
setting produced the following error: Expecteed: end of statement.</b> [Where
"On Open" could be replaced by "On Click", etc]

The problem ultimately was the letter "s" had gotten at the beginning of my
module code so that it read: <b>sOption Compare Database</b>...

Deleting the "s" fixed it! :)

Happy coding,
Aaron
Nov 13 '05 #1
7 2530

Sorry, thought <b> would work...don't see how to edit the post...if an admin
wants to delete those to make it more readable it would be fine.

A
Nov 13 '05 #2
Aaron G via AccessMonster.com wrote:
Sorry, thought <b> would work...don't see how to edit the post...if an admin
wants to delete those to make it more readable it would be fine.


Nope - AM sends your posts to usenet where plain text is traditional.
You'd have to couple the "<b>" with a "</b>", ie, html stuff. 8)

Thanks for the info on how the option compare statement can mess things
up if incorrectly entered! It's one of those things the intellisense
doesn't pick up as an error, I guess.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto
Nov 13 '05 #3
I just pasted this in access97

sOption Compare Database

and the line turned red indicating an error
and 'compiling' the module gave me the same error you got

sounds like good solutions to me

Nov 13 '05 #4
Tim Marshall <TI****@PurplePandaChasers.Moertherium> wrote in
news:dc**********@coranto.ucs.mun.ca:
Thanks for the info on how the option compare statement can mess
things up if incorrectly entered! It's one of those things the
intellisense doesn't pick up as an error, I guess.


Excuse, but don't you all regularly compile your modules? And your
databases as a whole? That would clearly throw an error as soon as
you tried to compile a module with such invalid code in it.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #5
David W. Fenton wrote:
Tim Marshall <TI****@PurplePandaChasers.Moertherium> wrote in Excuse, but don't you all regularly compile your modules? And your
databases as a whole? That would clearly throw an error as soon as
you tried to compile a module with such invalid code in it.


Yes, I quite a bit don't worry. I was just trying to be positive for
the fellow since he was obviously confused about what usenet is, I've
never seen him post before. I didn't want to appear to be lecturing,
but perhaps I went too soft wrt what future googling by newbies might
reveal...
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto
Nov 13 '05 #6
Tim Marshall wrote:
Yes, I quite a bit don't worry.


Er, I do, sorry.

Anyway, I don't know what I was thinking when I wrote my response to
Aaron G and really managed to let some of my boneheadedness I thought I
was doing a good job of hiding slip out like an accidental fart at a
quiet party!!!

8)
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto
Nov 13 '05 #7
Tim Marshall <TI****@PurplePandaChasers.Moertherium> wrote in
news:dc**********@coranto.ucs.mun.ca:
Tim Marshall wrote:
Yes, I quite a bit don't worry.


Er, I do, sorry.

Anyway, I don't know what I was thinking when I wrote my response
to Aaron G and really managed to let some of my boneheadedness I
thought I was doing a good job of hiding slip out like an
accidental fart at a quiet party!!!


As opposed to an intentional fart?

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jake Lloyd | last post by:
In "A Note on Security In PHP" (partly in reference to a security flaw that exists or recently did exist in phpBB) at http://nl3.php.net/security-note.php The PHP Group makes this claim: "Every...
8
by: eje | last post by:
IsNumeric(value) should return false if value "can not be successfully converted to a Double." Instead I get the following error message: "Input string was not in a correct format." I use the...
4
by: IMS.Rushikesh | last post by:
Hi All, I am trying to execute below code but it gives me an COMException ///// Code Start //// public string GetName(Excel.Range range) { try { if (range.Name != null)
2
by: James Doran | last post by:
Hello, I'd like to iterate through each Page of my ASP.NET project from within a Custom web control and access the Page.Controls collection. I've tried using Reflection on the web project...
1
by: Mitchell Vincent | last post by:
I've had this problem for a week, and it's just now getting to where I can't work on a project because of it. Every single project I load up in VS.NET 2003 that has an imagelist in it gives me a...
97
by: Master Programmer | last post by:
Thinking of learning VB.NET? New programmer? Thinking of Moving over from VB 6.0? Read on friend, let me help you make a more informed decision......... Microsoft are a pathetic company,...
2
by: Bill | last post by:
I have a 200 record database that includes a date/time field, AnnivDate, for a wedding anniversary. AnnivDate has nulls and some incorrect year data. I have been creating the Access database...
4
by: jonceramic | last post by:
Hi guys, I have a user who wants to have a report that shows only the 10th value recorded by his equipment. (i.e. His equipment records temperature every 30 seconds, but he only wants to view...
1
by: jan.marien | last post by:
we have a table with jobs and a table with job_history information. Users can define jobs and let them run every X minutes/hours , like a cronjob. The jobs table has the following trigger:...
0
by: foryou | last post by:
Earn 75 cents on every hour navigation Update!! This site is one of the sites profitability, which is one of the best types of profit and easier to open a page and leave the navigation of self...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...

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.