IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New ObVBASucks
So, in Visual Basic, if you want to grab an event that a control triggers, you name the event <control>_<event>. So, if your control was called cmdOK, and you wanted to catcht the "OnClick" event, you do the following:

Sub cmdOK_OnClick()\n ' Stuff here\nEnd Sub


Guess what? Under VBA in Access, you need to take one more step - select the control, switch to the Properties window, select "Events", find the appropriate event (not always with the same name as the event is referred to, either) and change it to some other value that escapes me right now.

Spent 3/4 a fucking hour tracking down that fucking bug. Also explains some other squirrely behavior I've seen elsewhere in my app.
Tired of lying in the sunshine staying home to watch the rain.
You are young and life is long and there is time to kill today.
And then one day you find ten years have got behind you.
No one told you when to run, you missed the starting gun.
New A taste of things to come...
To deny the indirect purchaser, who in this case is the ultimate purchaser, the right to seek relief from unlawful conduct, would essentially remove the word consumer from the Consumer Protection Act
- [link|http://www.techworld.com/opsys/news/index.cfm?NewsID=1246&Page=1&pagePos=20|Nebraska Supreme Court]
New Everything's easier with the mouse, right? ;)
New OTOH, are you sure you even *have to* name it like that?
I mean, if the way to associate an event handler with an event is to select the handler in the event's drop-down property selector, then it shouldn't matter what the event handler is called... And in fact, my vague recollection from VB (the "real" non-A VB, ages ago; VB 4 or possibly 5, IIRC) is that the name didn't, in fact, matter.

Are you really *sure* that the "magical naming" works in any other version, *without* explicitly associating the handler with the event by selecting it in the property inspector (or whatever MS calls that window)?

'Coz I actually doubt that even MS could make things *that* backwards... I rather suspect that the "magical name", that you seem to think should be sufficient to associate the handler with the event, is just the *default* name that the IDE comes up with if you let it *create* the (skeleton of an) event handler for you, by double-clicking on the event-handler property in the property inspector.

In short, I really don't think it's a "bug"; I think it's that you haven't fully grokked the functioning of event-based programming IDEs.

HTH!


   [link|mailto:MyUserId@MyISP.CountryCode|Christian R. Conrad]
(I live in Finland, and my e-mail in-box is at the Saunalahti company.)
Your lies are of Microsoftian Scale and boring to boot. Your 'depression' may be the closest you ever come to recognizing truth: you have no 'inferiority complex', you are inferior - and something inside you recognizes this. - [link|http://z.iwethey.org/forums/render/content/show?contentid=71575|Ashton Brown]
New Yes
Access is a little weird in that area. The event procedure name has to match the pattern object_event (though you leave off the "On" for the event).

The magic phrase that goes in the event property is [Event Procedure] which tells Access to look for the corresponding procedure with the above formatted name. You can also put the name of a macro or an expression starting with "=" (the later could be a way to call an alternate procedure) in the field.

So it isn't a bug, it's just different.
--
Chris Altmann
New Silly me...
...'coz I actually "doubt[ed] that even MS could make things *that* backwards"!

I have no real idea why I did that.

I'll try not to do it again.


   [link|mailto:MyUserId@MyISP.CountryCode|Christian R. Conrad]
(I live in Finland, and my e-mail in-box is at the Saunalahti company.)
Your lies are of Microsoftian Scale and boring to boot. Your 'depression' may be the closest you ever come to recognizing truth: you have no 'inferiority complex', you are inferior - and something inside you recognizes this. - [link|http://z.iwethey.org/forums/render/content/show?contentid=71575|Ashton Brown]
New Just wait until he tries to clone an object.
It ain't an object! Code doesn't come with the object.

(If it does, could someone tell me how. I hate first copying the GUI object, then going into VBA and copying the associated code, then renaming the object part of the code to make it work)
New VB.Net, C# and Delphi are the same way (new thread)
Created as new thread #155961 titled [link|/forums/render/content/show?contentid=155961|VB.Net, C# and Delphi are the same way]
--
Chris Altmann
New By the way...
You're probably too smart to do this anyway, but I thought I'd warn you just in case this is the first time you've used Access as a dev tool. Save yourself a ton of grief later and do not use bound forms.

In my consluting days I had to "fix" a rather largish Access application that used bound forms. It was hideous...
bcnu,
Mikem

If you can read this, you are not the President.
New What's a "bound form"?
I've been forced to use Access here and have learned via "trial and error".
New Controls bound to columns in the table/view.
You don't have to write any code to update the Text properties, write to the db, etc. Requires access to base tables (a taboo in my book - but let's not go through that again) or at least updateable views.

Others may differ, but w/Access if you use bound controls you have virtually no control over when your data gets updated. Also, performance really takes a hit, there are literally tons of reasons why "bound forms" (or "Data bound forms" is what I think MSFT calls them) are a very bad idea.

bcnu,
Mikem

If you can read this, you are not the President.
New Yeah, I figured that out very quickly.
Weird bugs cropping up in one form (I tend to be perfectionist, complete one form before going on to the next one) quickly made me decide to drop that "feature" entirely.
Tired of lying in the sunshine staying home to watch the rain.
You are young and life is long and there is time to kill today.
And then one day you find ten years have got behind you.
No one told you when to run, you missed the starting gun.
     Just shoot me. - (inthane-chan) - (32)
         VBA???? - (mmoffitt)
         It could be worse - (ben_tilly) - (2)
             Yeah, that's the one nice thing. - (inthane-chan)
             Intermediate "free" thing from MSFT. - (mmoffitt)
         Bang!!! - (broomberg) - (3)
             That is a VERY good thing to know Barry. - (folkert) - (2)
                 Kixtart rocks! - (tjsinclair) - (1)
                     Careware - (broomberg)
         Re: Just shoot me. - (dmarker) - (3)
             Sympathy? - (ben_tilly) - (1)
                 Yes, for sufficiently large values of it. -NT - (folkert)
             will be needing therapy, not sympathy. -NT - (imric)
         ObVBASucks - (inthane-chan) - (11)
             A taste of things to come... -NT - (ben_tilly)
             Everything's easier with the mouse, right? ;) -NT - (FuManChu)
             OTOH, are you sure you even *have to* name it like that? - (CRConrad) - (4)
                 Yes - (altmann) - (3)
                     Silly me... - (CRConrad) - (2)
                         Just wait until he tries to clone an object. - (jbrabeck) - (1)
                             VB.Net, C# and Delphi are the same way (new thread) - (altmann)
             By the way... - (mmoffitt) - (3)
                 What's a "bound form"? - (jbrabeck) - (1)
                     Controls bound to columns in the table/view. - (mmoffitt)
                 Yeah, I figured that out very quickly. - (inthane-chan)
         Bwaahaha ... haha ... mmmphh ... sorry, not very sympathetic -NT - (drewk)
         A question: - (jb4) - (6)
             Should have used "major"... - (inthane-chan)
             Ignore. - (inthane-chan) - (1)
                 Why should we Ignore - inthane-chan? - (jbrabeck)
             I'm tha WINNAH! - (CRConrad) - (2)
                 Now, why would I call you PeeWee, anyway? - (jb4) - (1)
                     Because he's a great big PUFF! -NT - (pwhysall)

Your entire eulogy was just your bartender telling a coroner, "Yeah, I think that's Britney."
70 ms