[AccessD] Highligt Row in Continuous Form

Mark A Matte markamatte at hotmail.com
Wed Oct 22 08:57:41 CDT 2003


Jim,

<<varLastRecord and lngOriginalColor are module level variables.>>

I guess I should read the emails more carefully...the statement I missed 
above made all the difference.

Thanks for the help!!!

Mark

>From: "Jim Dettman" <jimdettman at earthlink.net>
>Reply-To: Access Developers discussion and problem 
>solving<accessd at databaseadvisors.com>
>To: "Access Developers discussion and problem 
>solving"<accessd at databaseadvisors.com>
>Subject: RE: [AccessD] Highligt Row in Continuous Form
>Date: Tue, 21 Oct 2003 12:23:40 -0400
>
>Mark,
>
><<I apologize...I must be missing something...in the code below
>"varLastRecord" doesn't get a value assigned to it..>>
>
>   Yes it does:
>
> > >   ' Now set current record color, then change to something else
> > >   varLastRecord = Me.Bookmark
>
><<is it an API declared
>in a module?  I declared it as a variant but this doesn't give it a 
>value?>>
>
>   It would be a lot simpler to send you the sample database so you can 
>play
>with it.  Send me an e-mail off-list.
>
>Jim Dettman
>President,
>Online Computer Services of WNY, Inc.
>(315) 699-3443
>jimdettman at earthlink.net
>
>-----Original Message-----
>From: accessd-bounces at databaseadvisors.com
>[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Mark A Matte
>Sent: Tuesday, October 21, 2003 11:18 AM
>To: accessd at databaseadvisors.com
>Subject: RE: [AccessD] Highligt Row in Continuous Form
>
>
>Jim,
>
>I apologize...I must be missing something...in the code below
>"varLastRecord" doesn't get a value assigned to it...is it an API declared
>in a module?  I declared it as a variant but this doesn't give it a value?
>
>Thanks,
>
>Mark
>
> >From: "Jim Dettman" <jimdettman at earthlink.net>
> >Reply-To: Access Developers discussion and problem
> >solving<accessd at databaseadvisors.com>
> >To: "Access Developers discussion and problem
> >solving"<accessd at databaseadvisors.com>
> >Subject: RE: [AccessD] Highligt Row in Continuous Form
> >Date: Mon, 20 Oct 2003 14:15:59 -0400
> >
> >Mark,
> >
> >   Since it stores a bookmark, it must be a variant.
> >
> >Jim Dettman
> >President,
> >Online Computer Services of WNY, Inc.
> >(315) 699-3443
> >jimdettman at earthlink.net
> >
> >-----Original Message-----
> >From: accessd-bounces at databaseadvisors.com
> >[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Mark A Matte
> >Sent: Monday, October 20, 2003 1:02 PM
> >To: accessd at databaseadvisors.com
> >Subject: RE: [AccessD] Highligt Row in Continuous Form
> >
> >
> >Jim,
> >
> >How was "varLastRecord" declared/defined?
> >
> >Thanks,
> >
> >Mark
> >
> >
> > >From: "Jim Dettman" <jimdettman at earthlink.net>
> > >Reply-To: Access Developers discussion and problem
> > >solving<accessd at databaseadvisors.com>
> > >To: "Access Developers discussion and problem
> > >solving"<accessd at databaseadvisors.com>
> > >Subject: RE: [AccessD] Highligt Row in Continuous Form
> > >Date: Fri, 17 Oct 2003 14:54:55 -0400
> > >
> > >Mark,
> > >
> > >   You can do it strictly with OnCurrent.  See code below. 
>varLastRecord
> > >and
> > >lngOriginalColor are module level variables.
> > >
> > >Jim Dettman
> > >President,
> > >Online Computer Services of WNY, Inc.
> > >(315) 699-3443
> > >jimdettman at earthlink.net
> > >
> > >Private Sub Form_Current()
> > >
> > >   Dim rst As Recordset
> > >
> > >   Set rst = Me.RecordsetClone
> > >
> > >   ' Set background color of last record back to default.
> > >   If IsEmpty(varLastRecord) Then
> > >     ' Nothing to do
> > >   Else
> > >       rst.Bookmark = varLastRecord
> > >       rst.Edit
> > >         rst![DisplayColorFlag] = lngOriginalColor
> > >       rst.Update
> > >       Set rst = Nothing
> > >   End If
> > >
> > >   ' Now set current record color, then change to something else
> > >   varLastRecord = Me.Bookmark
> > >
> > >   lngOriginalColor = Me![DisplayColorFlag]
> > >   Me![DisplayColorFlag] = 3
> > >
> > >
> > >End Sub
> > >
> > >
> > >-----Original Message-----
> > >From: accessd-bounces at databaseadvisors.com
> > >[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Mark A Matte
> > >Sent: Friday, October 17, 2003 2:48 PM
> > >To: accessd at databaseadvisors.com
> > >Subject: RE: [AccessD] Highligt Row in Continuous Form
> > >
> > >
> > >Hello All,
> > >
> > >thanks for the suggestions...I changed the value of a field(fldColor)
> > >ONCURRENT and used a text box stretched across the detail section with
> >the
> > >control source==IIf([fldColor]=1,True,"").  I then changed the value of
> > >fldColor back to 0 on the BEFORE UPDATE...the only problem is that this
> >is
> > >in a continuous subform...and when I move to another subform...the 
>BEFORE
> > >UPDATE fires...So I'm thinking putting a if statement determining 
>whether
> > >or
> > >not the subform still has focus...and not changing the color if true?
> >Any
> > >thoughts?
> > >
> > >Thanks,
> > >
> > >Mark
> > >
> > >
> > > >From: "John Colby" <jcolby at colbyconsulting.com>
> > > >Reply-To: Access Developers discussion and problem
> > > >solving<accessd at databaseadvisors.com>
> > > >To: "Access Developers discussion and problem
> > > >solving"<accessd at databaseadvisors.com>
> > > >Subject: RE: [AccessD] Highligt Row in Continuous Form
> > > >Date: Fri, 17 Oct 2003 09:07:25 -0400
> > > >
> > > >Jim,
> > > >
> > > >Is the OLE control something built in to Access?  I tend to avoid 
>(like
> > >the
> > > >plague) having things that have to be registered by my app.
> > > >
> > > >John W. Colby
> > > >www.colbyconsulting.com
> > > >
> > > >-----Original Message-----
> > > >From: accessd-bounces at databaseadvisors.com
> > > >[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Jim Dettman
> > > >Sent: Friday, October 17, 2003 8:51 AM
> > > >To: Access Developers discussion and problem solving
> > > >Subject: RE: [AccessD] Highligt Row in Continuous Form
> > > >
> > > >
> > > >John,
> > > >
> > > >   Yes, that would work as well, as would storing a bookmark.  Both
> >would
> > > >be
> > > >faster then the function code posted.  The only drawback is that a
> > >requery
> > > >invalidates positions and bookmarks, but that is not a major obstacle
> >as
> > > >long as your aware of it.  The sample MDB I worked up has an example
> > >using
> > > >bookmarks.
> > > >
> > > >  You might want to take a look at the sample, as I use a slightly
> > > >different
> > > >technique (wish I could claim that I thought of it) to control row
> > >colors.
> > > >The technique (use of a bound OLE control) not only allows for
> >displaying
> > > >of
> > > >different colors, but graphics as well.  Quite flexible.
> > > >
> > > >Jim Dettman
> > > >President,
> > > >Online Computer Services of WNY, Inc.
> > > >(315) 699-3443
> > > >jimdettman at earthlink.net
> > > >
> > > >-----Original Message-----
> > > >From: accessd-bounces at databaseadvisors.com
> > > >[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of John Colby
> > > >Sent: Thursday, October 16, 2003 9:14 PM
> > > >To: Access Developers discussion and problem solving
> > > >Subject: RE: [AccessD] Highligt Row in Continuous Form
> > > >
> > > >
> > > >I went in to look at the demo.  It uses an entire function to get the
> > > >current line number.  In my framework I use
> > > >.RecordsetClone.AbsolutePosition.  Can anyone comment on whether this
> > > >replaces the function?
> > > >
> > > >John W. Colby
> > > >www.colbyconsulting.com
> > > >
> > > >-----Original Message-----
> > > >From: accessd-bounces at databaseadvisors.com
> > > >[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Mitsules,
> >Mark
> > > >Sent: Thursday, October 16, 2003 3:59 PM
> > > >To: 'Access Developers discussion and problem solving'
> > > >Subject: RE: [AccessD] Highligt Row in Continuous Form
> > > >
> > > >
> > > >Changing the Background Color of the Current Record in a Continuous
> >Form
> > > >http://www.mvps.org/access/forms/frm0047.htm
> > > >
> > > >
> > > >
> > > >Mark
> > > >
> > > >
> > > >-----Original Message-----
> > > >From: Mark A Matte [mailto:markamatte at hotmail.com]
> > > >Sent: Thursday, October 16, 2003 3:06 PM
> > > >To: accessd at databaseadvisors.com
> > > >Subject: [AccessD] Highligt Row in Continuous Form
> > > >
> > > >
> > > >Hello All,
> > > >
> > > >In A97 on a continuous form...I want to highlight or identify the row
> > >that
> > > >has focus.  Change the color of something...anything...but only on 
>that
> > > >record?  Is this possible?  Everything I tried changed the color of
> >every
> > > >instance of that control...not just the one on the current record?
> > > >
> > > >Any Ideas?
> > > >
> > > >Thanks,
> > > >
> > > >Mark
> > > >
> > > >_________________________________________________________________
> > > >Enjoy MSN 8 patented spam control and more with MSN 8 Dial-up 
>Internet
> > > >Service.  Try it FREE for one month!
> > > >http://join.msn.com/?page=dept/dialup
> > > >
> > > >_______________________________________________
> > > >AccessD mailing list
> > > >AccessD at databaseadvisors.com
> > > >http://databaseadvisors.com/mailman/listinfo/accessd
> > > >Website: http://www.databaseadvisors.com
> > > >_______________________________________________
> > > >AccessD mailing list
> > > >AccessD at databaseadvisors.com
> > > >http://databaseadvisors.com/mailman/listinfo/accessd
> > > >Website: http://www.databaseadvisors.com
> > > >
> > > >
> > > >
> > > >_______________________________________________
> > > >AccessD mailing list
> > > >AccessD at databaseadvisors.com
> > > >http://databaseadvisors.com/mailman/listinfo/accessd
> > > >Website: http://www.databaseadvisors.com
> > > >
> > > >
> > > >_______________________________________________
> > > >AccessD mailing list
> > > >AccessD at databaseadvisors.com
> > > >http://databaseadvisors.com/mailman/listinfo/accessd
> > > >Website: http://www.databaseadvisors.com
> > > >
> > > >
> > > >
> > > >_______________________________________________
> > > >AccessD mailing list
> > > >AccessD at databaseadvisors.com
> > > >http://databaseadvisors.com/mailman/listinfo/accessd
> > > >Website: http://www.databaseadvisors.com
> > >
> > >_________________________________________________________________
> > >Add MSN 8 Internet Software to your current Internet access and enjoy
> > >patented spam control and more.  Get two months FREE!
> > >http://join.msn.com/?page=dept/byoa
> > >
> > >_______________________________________________
> > >AccessD mailing list
> > >AccessD at databaseadvisors.com
> > >http://databaseadvisors.com/mailman/listinfo/accessd
> > >Website: http://www.databaseadvisors.com
> > >
> > >
> > >_______________________________________________
> > >AccessD mailing list
> > >AccessD at databaseadvisors.com
> > >http://databaseadvisors.com/mailman/listinfo/accessd
> > >Website: http://www.databaseadvisors.com
> >
> >_________________________________________________________________
> >Surf and talk on the phone at the same time with broadband Internet 
>access.
> >Get high-speed for as low as $29.95/month (depending on the local service
> >providers in your area).  https://broadband.msn.com
> >
> >_______________________________________________
> >AccessD mailing list
> >AccessD at databaseadvisors.com
> >http://databaseadvisors.com/mailman/listinfo/accessd
> >Website: http://www.databaseadvisors.com
> >
> >
> >_______________________________________________
> >AccessD mailing list
> >AccessD at databaseadvisors.com
> >http://databaseadvisors.com/mailman/listinfo/accessd
> >Website: http://www.databaseadvisors.com
>
>_________________________________________________________________
>Fast, faster, fastest: Upgrade to Cable or DSL today!
>https://broadband.msn.com
>
>_______________________________________________
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com
>
>
>_______________________________________________
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com

_________________________________________________________________
Get 10MB of e-mail storage! Sign up for Hotmail Extra Storage.  
http://join.msn.com/?PAGE=features/es



More information about the AccessD mailing list