Re: object variable or with block variable not set
From: Adam Ulrich \(MS\) (adamu_at_online.microsoft.com)
Date: 07/22/04
- Next message: Stephen Lebans: "Re: object variable or with block variable not set"
- Previous message: Chris Mills: "Re: Access 97 vs Later Version"
- In reply to: Tony: "Re: object variable or with block variable not set"
- Next in thread: Stephen Lebans: "Re: object variable or with block variable not set"
- Reply: Stephen Lebans: "Re: object variable or with block variable not set"
- Reply: Tony: "Re: object variable or with block variable not set"
- Reply: Tony: "Re: object variable or with block variable not set"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 22 Jul 2004 15:06:54 -0700
Yes, I have a pretty good idea. Form_close is not equivalent to Form_unload.
In your case, something else is holding onto the form as a reference, and it
is being closed, but not unloaded from memory. Maybe other forms? You can
confirm this by putting a break point in the form_load and form_close
methods. I bet you hit the form_load and form_close the first time, but any
subsequent times the form is displayed and the form_load is not fired, but
closing the form causes the form_close to fire, and your objects have not
been declared this time because form_load never fired. To fix this, try
moving the code from form_load into form_activate. regardless of the forms
load status, activate should always fire.
Regards,
Adam
"Tony" <anonymous@discussions.microsoft.com> wrote in message
news:20d701c46ffb$73899f50$a401280a@phx.gbl...
> It doesn't happen the first time that I close the
> form...it's like the .dll needs to be re-registered or
> something...but once I get it once, I get it every time I
> close a form that has the procedure. Have an idea, Adam?
> Thanks, Tony
>
>>-----Original Message-----
>>Tony, I am interested to know if it happens every time
> you close the
>>specific form or if it happens only part of the time you
> close the form.
>>
>>-Adam
>>
>>
>>"Stephen Lebans" <ForEmailGotoMy.WebSite.-
> WWWdotlebansdotcom@linvalid.com>
>>wrote in message news:%
> 23mDlsO2bEHA.2944@TK2MSFTNGP11.phx.gbl...
>>> Tony the MouseHook DLL is in use by 1000's of people. I
> cannot duplicate
>>> the behaviour you describe nor has anyone ever emailed
> or posted the
>>> issue you are describing.
>>> As I replied to your Email today, my question remains,
> are you able to
>>> get the sample form to work properly?
>>> --
>>>
>>> HTH
>>> Stephen Lebans
>>> http://www.lebans.com
>>> Access Code, Tips and Tricks
>>> Please respond only to the newsgroups so everyone can
> benefit.
>>>
>>>
>>> "Tony" <anonymous@discussions.microsoft.com> wrote in
> message
>>> news:12eb01c46f20$dff9c060$a401280a@phx.gbl...
>>>> Actually, that only works if the focus is in one the
>>>> controls that hold data. Then the mouse wheel doesn't
>>>> work. If a command button has the focus, the mouse
> wheel
>>>> allows users to scroll through records.
>>>>
>>>> >-----Original Message-----
>>>> >Sorry: no idea, other than perhaps you made a mistake
> in
>>>> creating the DLL.
>>>> >
>>>> >To get around this, check out what Stephen Lebans has
> at
>>>> >http://www.lebans.com/mousewheelonoff.htm It's a far
>>>> better solution than
>>>> >that KB article anyhow.
>>>> >
>>>> >--
>>>> >Doug Steele, Microsoft Access MVP
>>>> >http://I.Am/DougSteele
>>>> >(no e-mails, please!)
>>>> >
>>>> >
>>>> >
>>>> >"Tony" <anonymous@discussions.microsoft.com> wrote in
>>>> message
>>>> >news:08ad01c46e5f$a3ea3440$a301280a@phx.gbl...
>>>> >> Morning, Doug, no, no errors before it happens.
> Tony
>>>> >>
>>>> >> >-----Original Message-----
>>>> >> >Do you normally encounter an error, and afterwards
> the
>>>> >> problem arises?
>>>> >> >
>>>> >> >--
>>>> >> >Doug Steele, Microsoft Access MVP
>>>> >> >http://I.Am/DougSteele
>>>> >> >(no e-mails, please!)
>>>> >> >
>>>> >> >
>>>> >> >
>>>> >> >"Tony" <anonymous@discussions.microsoft.com> wrote
> in
>>>> >> message
>>>> >> >news:2f8b701c46d89$9aad1cc0$a401280a@phx.gbl...
>>>> >> >> Doug, thank you for answering. It happens
>>>> sporadically
>>>> >> >> and only on one form. Tony
>>>> >> >>
>>>> >> >> >-----Original Message-----
>>>> >> >> >It sounds as though something is causing
>>>> clsMouseWheel
>>>> >> >> to become
>>>> >> >> >uninstantiated during the execution. Does this
>>>> happen
>>>> >> >> every time, or only
>>>> >> >> >when an error occurs when using the form.
>>>> >> >> >
>>>> >> >> >--
>>>> >> >> >Doug Steele, Microsoft Access MVP
>>>> >> >> >http://I.Am/DougSteele
>>>> >> >> >(no e-mails, please!)
>>>> >> >> >
>>>> >> >> >
>>>> >> >> >
>>>> >> >> >"Tony" <anonymous@discussions.microsoft.com>
> wrote
>>>> in
>>>> >> >> message
>>>> >> >> >news:2ee3901c46b67$3e8df230$a301280a@phx.gbl...
>>>> >> >> >> Hello, everybody...I found an article on MS
>>>> website
>>>> >> on
>>>> >> >> how
>>>> >> >> >> to prevent the Mouse Wheel from scrolling
> through
>>>> >> >> records
>>>> >> >> >> in a MS Access DB
>>>> >> (support.microsoft.com/defalut.aspx?
>>>> >> >> >> scid=kb;en-us;278379). On the form Load
> event I
>>>> >> have:
>>>> >> >> >> Set clsMouseWheel = New
> MouseWheel.CMouseWheel
>>>> >> >> >> Set clsMouseWheel.Form = Me
>>>> >> >> >> clsMouseWheel.SubClassHookForm
>>>> >> >> >> and on the form's Close event I have:
>>>> >> >> >> clsMouseWheel.SubClassUnHookForm
>>>> >> >> >> Set clsMouseWheel.Form = Nothing
>>>> >> >> >> Set clsMouseWheel = Nothing
>>>> >> >> >> When I close the form, I receive a "Run-time
>>>> >> Error '91':
>>>> >> >> >> object variable or With block variable not
>>>> >> set"...Does
>>>> >> >> >> anyone know a fix to this? I can't find
> where the
>>>> >> >> problem
>>>> >> >> >> might be. Thanks, Tony
>>>> >> >> >
>>>> >> >> >
>>>> >> >> >.
>>>> >> >> >
>>>> >> >
>>>> >> >
>>>> >> >.
>>>> >> >
>>>> >
>>>> >
>>>> >.
>>>> >
>>>
>>
>>
>>.
>>
- Next message: Stephen Lebans: "Re: object variable or with block variable not set"
- Previous message: Chris Mills: "Re: Access 97 vs Later Version"
- In reply to: Tony: "Re: object variable or with block variable not set"
- Next in thread: Stephen Lebans: "Re: object variable or with block variable not set"
- Reply: Stephen Lebans: "Re: object variable or with block variable not set"
- Reply: Tony: "Re: object variable or with block variable not set"
- Reply: Tony: "Re: object variable or with block variable not set"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|