Mark A Matte
markamatte at hotmail.com
Mon Oct 20 12:01:41 CDT 2003
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