[AccessD] Disabling an Option Group

John Colby jwcolby at gmail.com
Sun Jan 14 13:18:21 CST 2024


Rocky, is the field true for every record?  It feels like there should be
an else which sets enabled to true.

Did you watch the youtube video for that part where the presenter discussed
what he was doing.

On Sat, Jan 13, 2024 at 8:58 PM Rocky Smolin <rockysmolin2 at gmail.com> wrote:

> I tried it with:
>
>     Private Sub Detail_Paint()
>     If Me.fldTenantLeaseStepHeading = True Then
> Me.fldTenantLeaseStepUrgency.Enabled = False
> End Sub
>
> and it turned the urgency field false for all the records.
>
> r
>
> On Sat, Jan 13, 2024 at 4:44 PM Stuart McLachlan <stuart at lexacorp.com.pg>
> wrote:
>
> > You can try to use it, but unless you are just changing control colours,
> > you'll probably either
> > get a Compile error: Invalid use of property
> > or
> > Error 32521: You can't change the value of this property in the OnPaint
> > event.
> > or
> >  constant redraws and flickering and possibly an unresposnive form.
> >
> >
> >
> >
> > On 13 Jan 2024 at 19:16, John Colby wrote:
> >
> > > OK, my apologies, it is the OnPaint event.
> > >
> > > Youtube video which toggles background color of a record in continuous
> > > <https://www.youtube.com/watch?v=Y2t0JDeFpR4&list=PLwIULo1M2EWukaR2n0S
> > > T44ajp9_LsLOLa&index=9&t=3135s>
> > >
> > > at time 47:03
> > >
> > > On Sat, Jan 13, 2024 at 5:54PM Stuart McLachlan
> > > <stuart at lexacorp.com.pg> wrote:
> > >
> > > > I can't find an OnFormat  event anywhere on a bound continuous form
> > > > in Access 2021 ( Not for Form, Detail or a Control) . Where is it?
> > > >
> > > > On 13 Jan 2024 at 13:08, John Colby wrote:
> > > >
> > > > > I discovered the other day that there is an OnFormat event which
> > > > > fires for every line of a continuous form.  In that you can liik
> > > > > at the value of a field in that record and do stuff...  You might
> > > > > want to investigate doing it this way?
> > > > >
> > > > > On Sat, Jan 13, 2024 at 12:17PM Rocky Smolin
> > > > > <rockysmolin2 at gmail.com> wrote:
> > > > >
> > > > > > Well, it's a continuous form so if the user selects a header
> > > > > > record, then all the option groups would turn disabled. A bit
> > > > > > confusing for them.
> > > > > >
> > > > > > What I did was put code in wherever this option group appears:
> > > > > >
> > > > > > Private Sub fldTenantLeaseStepUrgency_Click()
> > > > > >     If Me.fldTenantLeaseStepHeading = True Then
> > > > > > Me.fldTenantLeaseStepUrgency = Null
> > > > > > End Sub
> > > > > >
> > > > > > Now the header record has a pale purple background so it's
> > > > > > obvious looking at the list of steps which ones are headers. And
> > > > > > so there's no reason to ever click on that field. But if they do
> > > > > > nothing happens. And hopefully at that point they'll think
> > > > > > "D'oh. That is a header record, stupid.  Why am I trying to
> > > > > > select an urgency?"
> > > > > >
> > > > > > (Users (sigh). You never know what they're going to do next...")
> > > > > > r
> > > > > >
> > > > > > On Thu, Jan 11, 2024 at 6:54PM Charlotte Foust
> > > > > > <charlotte.foust at gmail.com
> > > > > > >
> > > > > > wrote:
> > > > > >
> > > > > > > Hide a disabled (empty datasource) option group on the header
> > > > > > > in the same location as the active one. Toggle visibility in
> > > > > > > the OnCurrent event of
> > > > > > the
> > > > > > > form.
> > > > > > >
> > > > > > > Charlotte Foust
> > > > > > > (916) 206-4336
> > > > > > >
> > > > > > >
> > > > > > > On Wed, Jan 10, 2024 at 7:29AM Rocky Smolin
> > > > > > > <rockysmolin2 at gmail.com> wrote:
> > > > > > >
> > > > > > > > Yes, that would work if the user tried to change the urgency
> > > > > > > > on a
> > > > > > header
> > > > > > > > record. But only when that record on the continuous form is
> > > > > > > > selected.
> > > > > > > >
> > > > > > > > The client wants a visual cue that the urgency field is not
> > > > > > > > disabled.
> > > > > > > >
> > > > > > > > (Clients...you never know what they´re going to ask for
> > > > > > > > next...)
> > > > > > > >
> > > > > > > > R
> > > > > > > >
> > > > > > > > On Tue, Jan 9, 2024 at 11:51PM Gustav Brock via AccessD <
> > > > > > > > accessd at databaseadvisors.com> wrote:
> > > > > > > >
> > > > > > > > > Hi Rocky
> > > > > > > > >
> > > > > > > > > Maybe you, at the OnCurrent event, could lock the option
> > > > > > > > > group if the record is a heading?
> > > > > > > > >
> > > > > > > > > /gustav
> > > > > > > > >
> > > > > > > > > ________________________________
> > > > > > > > > Fra: AccessD
> > > > > > > > > <accessd-bounces+gustav=cactus.dk at databaseadvisors.com>
> > > > > > > på
> > > > > > > > > vegne af Rocky Smolin <rockysmolin2 at gmail.com>
> > > > > > > > > Sendt: 10. januar 2024 00:27
> > > > > > > > > Til: Off Topic <dba-ot at databaseadvisors.com>; Access
> > > > > > > > > Developers discussion and problem solving
> > > > > > > > > <accessd at databaseadvisors.com> Emne: [AccessD] Disabling
> > > > > > > > > an Option Group
> > > > > > > > >
> > > > > > > > > Dear List:
> > > > > > > > >
> > > > > > > > > I have a continuous form with a procedure - series of
> > > > > > > > > steps. Some of
> > > > > > > > those
> > > > > > > > > records are "Headings" - not operational steps. Each step
> > > > > > > > > also has a priority or urgency field which is an option
> > > > > > > > > group with five option buttons.
> > > > > > > > >
> > > > > > > > > I have used conditional formatting to make the background
> > > > > > > > > of the
> > > > > > fields
> > > > > > > > of
> > > > > > > > > the heading lines purple - non-heading line fields are
> > > > > > > > > white.
> > > > > > > > >
> > > > > > > > > Client now would like to have the option group on the
> > > > > > > > > heading lines disabled. But conditional formatting doesn't
> > > > > > > > > appear to be an option
> > > > > > for
> > > > > > > > an
> > > > > > > > > option group. (At least not in Access 2010, which is what
> > > > > > > > > I'm using.)
> > > > > > > > >
> > > > > > > > > I'm going to give him the bad news that option groups
> > > > > > > > > don't support conditional formatting. He'll be OK with
> > > > > > > > > that.
> > > > > > > > >
> > > > > > > > > But...does anyone have any clever or kludgey ideas to give
> > > > > > > > > him what
> > > > > > he
> > > > > > > > > wants?
> > > > > > > > >
> > > > > > > > > MTIA
> > > > > > > > >
> > > > > > > > > r
> > > > > > > > > --
> > > > > > > > > AccessD mailing list
> > > > > > > > > AccessD at databaseadvisors.com
> > > > > > > > > https://databaseadvisors.com/mailman/listinfo/accessd
> > > > > > > > > Website: http://www.databaseadvisors.com
> > > > > > > > >
> > > > > > > > --
> > > > > > > > AccessD mailing list
> > > > > > > > AccessD at databaseadvisors.com
> > > > > > > > https://databaseadvisors.com/mailman/listinfo/accessd
> > > > > > > > Website: http://www.databaseadvisors.com
> > > > > > > >
> > > > > > > --
> > > > > > > AccessD mailing list
> > > > > > > AccessD at databaseadvisors.com
> > > > > > > https://databaseadvisors.com/mailman/listinfo/accessd
> > > > > > > Website: http://www.databaseadvisors.com
> > > > > > >
> > > > > > --
> > > > > > AccessD mailing list
> > > > > > AccessD at databaseadvisors.com
> > > > > > https://databaseadvisors.com/mailman/listinfo/accessd
> > > > > > Website: http://www.databaseadvisors.com
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > John W. Colby
> > > > > Colby Consulting
> > > > > --
> > > > > AccessD mailing list
> > > > > AccessD at databaseadvisors.com
> > > > > https://databaseadvisors.com/mailman/listinfo/accessd
> > > > > Website: http://www.databaseadvisors.com
> > > >
> > > >
> > > > --
> > > > AccessD mailing list
> > > > AccessD at databaseadvisors.com
> > > > https://databaseadvisors.com/mailman/listinfo/accessd
> > > > Website: http://www.databaseadvisors.com
> > > >
> > >
> > >
> > > --
> > > John W. Colby
> > > Colby Consulting
> > > --
> > > AccessD mailing list
> > > AccessD at databaseadvisors.com
> > > https://databaseadvisors.com/mailman/listinfo/accessd
> > > Website: http://www.databaseadvisors.com
> >
> >
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > https://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


-- 
John W. Colby
Colby Consulting


More information about the AccessD mailing list