- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
That is incorrect. All it takes is "Application.Quit", doesn't matter if forms are open.
Admin
Uhh what?
Second() returns a integer from 0-59 representing the current second.
startof will be set to 0-59 when the function is called.
Second(now) in the loop will return 0-59 meaning that if startof + longish >= 59 then temp will never be > longish and it will keep looping
second(12:00:01) - second(12:01:01) returns 0, not 60
Admin
The real reason why it was slow is because they were using Access, they should have used APDB.
Admin
Interesting... this appears to be one of the more non-wtf clients in the end. Why? Since they called back the guy who they hired first, obviously because of the expertise... and showing more common sense then I've had the chance of seeing.
Admin
Admin
Admin
"pulled-out" should be "pulled out". It's a verb followed by an adverb (like "log in" or "set up" or "frame up"), not a phrase acting as a noun (like "log-in or "setup" or "frame-up").
Admin
Known well to "Anonymous" since conception.
Admin
Divided by 2?
Admin
So, do you think Fred was fired, or MegaQuit?
Admin
Captcha: nibh - Where Billy Madison goes to school.
Admin
"Dim FredBlogs" How prescient.
Admin
That part seems accurate.
Admin
Admin
What it says:
What it means:
Admin
Hey at least I gave them a moment of false hope, instead of those dialogs that say "you're toasted, all your data will be gone as soon as you click OK" and then only offer one choice: OK.
Admin
love how everything's a variant... great use of memory...
Admin
The intention of MegaQuit() is good, to provide a single exit point for the app, and to insure that cleanup code runs.
It's a horrid implementation, though.
As to closing forms before exit, it's not necessary, but there are reasons why you would do it because there's a certain bug in Access that when you close a form a certain way, a dirty record may not be saved.
Properly writing the code to handle that would mean checking if each form is dirty before closing it, and forcing the save before closing, so that if any errors happen in the save, it can be handled appropriately.
The criticism that the code is disorganized is completely correct though -- very user-hostile to lose the application state and then ask if they user wants to exit.
The other stuff is indefensibly comical.
I get hired all the time to fix old and broken Access apps. Most of them have absolutely no VBA code (though often hundreds of tangled macros), or only code that was created by the Access wizards. This one looks like it was written by someone who didn't understand the Access model (i.e., build your UI objects with point and click and wizards and then tie them together with some well-written code, only as much code as is essential to get the job done), perhaps a refugee from some other programming environment where you have to code the most basic functionality.
FWIW, I've seen really bizarre code in all sorts of different languages. I don't think there's anything specific about VBA/Access. Sturgeon's Law and all that...
-- David W. Fenton David Fenton Associates http://dfenton.com/DFA/
Admin
Sure, you can post all nice and concise when you are using your real name, but the real test of character is if you can do it while anonymous.
Admin
I joined just to say how MegaAwesome this comment is.
Admin
Damn! I wish i had thought of MegaQuit!
The database i currently maintain has Mega Search, just not Mega Quit. Damn!
Admin
Well, this makes perfect sense on an embedded platform with no file system. It's strange that nobody pointed it out already.
Admin
What, no IT Crowd reference?
Admin
It loops infinitum depending on what time you call it. If we pass in 20 seconds and seconds(Now())=50 what is the max value of temp.
Admin
Most of this is indeed awful - but the curious error message text is quite endearing and might have a point to it.
I've found that users' descriptions of error messages tend to be a little inaccurate, so I tend to write ones that are stylistically quirky so that they're easy to identify even when I hear a garbled account of them. This guy's users probably see errors even more than mine do, so it might be even more important to him.
CAPTCHA "odio" - I hate - but I don't, much
Admin
Admin
Did you redefine MsgBox sub? Can i see the code?
P. S.: CAPTCHA is "genitus"
Admin
Admin
Ok my google foo is weak today, and I am not much of a DBA, what is a 'dirty' record? (aside from a music label in New Zealand)
Admin
Admin
OK, since you're answering questions. What if I replace record with Sanchez?
Admin
Well, then it moves from New Zealand to California and becomes a band instead of a whole label.
Admin
M M M M MegaQuit!
</UT2004AnnouncerVoice>Admin
Admin
You can get the line number with Erl if you number the lines of code, like old-style BASIC.
Admin
The crazy thing about that method is that the line numbers STAY THE SAME on each line, even when you add new code.
So you come back a year later, and line number 75832 still points to the same code it pointed to last year!
Crazy language.
Admin
But it needs XML too
Admin
You comment guys and gals are aweseome. As the manager of a small dev team, I now have this dream where I post my team's s**t code up here and have you guys gently and sardonically take the piss out of them. Seriously, when you consider both the appalling level of sophistication, sensitivity and even basic grammar of your average YouTube comment, the comments here are on a godlike level. Keep up the good work, you are all clearly wasted in your day jobs as coders.
Your reward is now to recieve my response to the original post, in the stylee of a YouTube commenter:
What the FUCK does WTF mean aneeway? YOU are all GAY! FredBloggs is a dickwit that probably sucks gay ass cos he is too fuked to actooally know shit like I do. I bet he is blak too and anyway Laydy Gaga has a dik
Admin
At least the database admitted something was wrong rather than some other Access databases I have come across which tried to dismiss the error messages and go off in its own macro induced tangent, or like the one I had the misfortune to try and fix a couple of years ago where the message boxes and error messages bordered on abuse from the database.
One particular error message sprang to mind was: 'You forgot to enable the complier Smeghead, I will not do anything until you go back and turn the f**king thing on you sorry excuse for being Human.'
Needless to say one of the jobs my team had to fix was the supposed attitude problem the Access database had towards its users.
Admin
Admin
MegaComment()
Admin
Can't he go back and enter it now?