Re: chkobsolete_afterUpdate() change

anonymous_at_discussions.microsoft.com
Date: 03/10/05


Date: Thu, 10 Mar 2005 10:31:18 -0800

Dirk:

Sorry our system went down and I couldn't get back to this
until now.

Here is the code as I currently have it written. I have
run step the function with no error messages

Private Sub Obsolete_AfterUpdate()
If Me.Obsolete Then

         For Each ctl In Me.Controls

             If Left(ctl.Name, 2) = "db" Then
                 ctl = no
             ElseIf Left(ctl.Name, 2) = "ob" Then
                 ctl = yes
             End If

         Next ctl
     End If
End Sub

>-----Original Message-----
>"Sondra" <anonymous@discussions.microsoft.com> wrote in
message
>news:478801c520ec$64b5e4a0$a401280a@phx.gbl
>>> Are these controls members of option groups, or
standalone
>>> controls?
>>
>> The options are standalone.
>>
>>> But the original code worked, so far as it went?
>>
>> Not working at all!
>
>I know it's not working now, but I was under the
impression that you
>were starting from code that was actually working, and
then modifying
>it -- and the modifications didn't work. So I didn't
investigate
>certain possibilities.
>
>>> Are you sure you copied the code exactly?
>>
>> The only diference was that I changed the name of the
>> binders from "togbinder" to "db*" and "miscbinder"
to "ob*"
>>
>> *=binder Number
>>
>> I changed the ctl.Name, 9 to ct.Name, 2
>>
>>> Do none of the buttons get set or cleared properly, or
is
>>> it just the "miscBinder" buttons that aren't working?
>>
>> No checks are being adjusted to yes or no, true or
false,
>> or 0 or -1.
>
>You're going to have to copy and paste the actual code,
as it is now,
>into a message, so I can see what you're really trying to
execute.
>Errors creep in every time you re-type something.
>
>Also, please try compiling your project using the menu
items Debug ->
>Compile. If any error messages are displayed, please
report them.
>
>Did you do what I said, and set a breakpoint in the code
to see if it
>gets called at all? Make sure that the After Update
property for the
>control "chkobsolete" -- on the Event tab of the
control's property
>*** -- is set to "[Event Procedure]".
>
>--
>Dirk Goldgar, MS Access MVP
>www.datagnostics.com
>
>(please reply to the newsgroup)
>
>
>.
>