Kamis, 09 Agustus 2012

Re: [MS_AccessPros] Re: Control Arrays

 

Hi Allen,

sorry for being so cryptic, glad you accomplished what you were after with conditional formatting.  One thing to realize about conditional formatting on a continuous form is that is doesn't get applied till scrolling stops -- so if you are dragging the scrollbox hoping to see your conditional formatting, you won't.  Instead, click in the area between the scroll box and the up or down arrow to move one screen at a time ;)

Warm Regards,
Crystal

http://www.YouTube.com/LearnAccessByCrystal

 *
   (: have an awesome day :)
 *

________________________________
From: Allen Bennett <Allen@AffiliateDreams.com>
To: MS_Access_Professionals@yahoogroups.com
Sent: Thursday, August 9, 2012 5:38 PM
Subject: Re: [MS_AccessPros] Re: Control Arrays

Yep--I couldn't quite understand Crystal's answer, so I googled it, and
learned about conditional formatting. It works great.

Thanks for answering.

Allen Bennett

On 8/9/2012 10:48 AM, acravenrohm wrote:.

> I haven't seen any workarounds which save much effort.
>
> One trick I have used is to set the Event Procedures to be something
> like =MyLostFocus(1) for the first control or =MyLostFocus(12) for the
> 12th control or similar.
>
> Then the routine would be:
>
> Function MyLostFocus(Index As Integer) as integer
>
> Me.Controls("Text" & Index).BackColor = vbWhite
>
> End function
>
> However, if the only thing you are trying to do is set the backcolor
> to hightlight the focus, use the Conditional Formating and Access will
> look after it for you.
>
> Yours, Andrew
>
> --- In MS_Access_Professionals@yahoogroups.com
> <mailto:MS_Access_Professionals%40yahoogroups.com>, Allen Bennett
> <Allen@...> wrote:
> >
> > I'm used to this in VB6. How do I implement a similar thing in an
> Access
> > 2007 form? I'd rather no do each text box (of a dozen) separately.
> >
> > Private Sub Text1_GotFocus(Index As Integer)
> >
> > Text1(Index).BackColor = vbYellow
> >
> > End Sub
> >
> > Private Sub Text1_LostFocus(Index As Integer)
> >
> > Text1(Index).BackColor = vbWhite
> >
> > End Sub
> >
> > Allen Bennett
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>

[Non-text portions of this message have been removed]

------------------------------------

Yahoo! Groups Links

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar