Re: Current Record?
From: Nikos Yannacopoulos (nyannacoREMOVETHISBIT_at_in.gr)
Date: 09/02/04
- Next message: derek: "Text in code turns red?"
- Previous message: Kiwi lost in Asia: "RE: Current Record?"
- In reply to: Kiwi lost in Asia: "Current Record?"
- Next in thread: Douglas J. Steele: "Re: Current Record?"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: derek: "Text in code turns red?"
- Previous message: Kiwi lost in Asia: "RE: Current Record?"
- In reply to: Kiwi lost in Asia: "Current Record?"
- Next in thread: Douglas J. Steele: "Re: Current Record?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|