Re: Current Record?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Nikos Yannacopoulos (nyannacoREMOVETHISBIT_at_in.gr)
Date: 09/02/04


Date: Thu, 2 Sep 2004 10:54:19 +0300

Considering your condition is based on just one control (Manufacturer), I
would say the code needs to fire only when there is a change in the
particular control, not the whole form (i.e. any control). The Before Update
event of the particular control would be a good choice (though the After
Update or On Change events would also do it, I suppose).

I would think it's a good idea to also leave the code in the form's On
Current event, so it fires on form open and while browsing through records,
to do what you want on each record displayed.

HTH,
Nikos

"Kiwi lost in Asia" <KiwilostinAsia@discussions.microsoft.com> wrote in
message news:1315D947-0A62-4068-93B2-E6E59EF2468B@microsoft.com...
> Hi, I'm trying to have some code execute automatically whenever a record
is
> changed.
>
> Should it be in the On Current sub for the form? Because that doesn't seem
> to do anything.
>
> Private Sub Form_Current()
> If LCase(Me.Manufacturer) <> "cisco" Then
> Me.SmartNet_Num.Enabled = False
> Me.SmartNet_Type.Enabled = False
> Me.SmartNet_Start.Enabled = False
> Me.SmartNet_End.Enabled = False
> Me.SmartNet_Vendor_Code.Enabled = False
> Me.Prev_Smartnet.Enabled = False
> Me.Open_Cisco.Enabled = False
> End If
> End Sub



Relevant Pages

  • Re: Stupid problem
    ... Private Sub TabS_KeyDown ... I did find that if focus is on an intrinsic control and I press F3 it fires the menu click event but does NOT fire the Form_KeyDown or the control's KeyDown. ... In no case could I get the control's keydown event to fire if the menu shortcut was pressed and the menu was enabled. ...
    (microsoft.public.vb.general.discussion)
  • Re: Controling Event Sequencing...
    ... have it execute AFTER the OnClick in completely done ... ... control exposes this event to the programmer to allow him / her to capture ... immidiately fire after the programmer's - ItemChanged event ... ... I can use my custom event ueMyEventChanged to access the ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Hmmmmm.........
    ... you have nothing to add with substantiating proof. ... the dozens of live television reports of multiple explosions as ... The fire was a joke. ... Control, fear, intimidation, false grounds for aggression ...
    (rec.audio.pro)
  • Re: Apollo One, the FBI, and Scott Grissom <- WARNING! TROLL! Probably Mary Zornio in drag again,
    ... >> prevent originals from being removed and it cut off the numbers. ... Scott never mentions it AFAIK. ... he had to fire it a second time. ... Control portion of the Static Fire test there is only one maneuver ...
    (sci.space.history)
  • Military - Orders and Advancement.
    ... Actually I was unusual in that I made E-5 'honestly' as opposed to ... was a 3305 (Trident-I and Trident-I Backfit Strategic Missile Fire ... Control), but the FTB rate also included 3304 (Posiedon Fleet ... people were advanced via the test each cycle for a total of 4 E-5's ...
    (sci.space.history)