Mark A Matte
markamatte at hotmail.com
Fri Sep 21 09:32:42 CDT 2007
John, >> That is not plain English, that is database speak. With this audience...I'm pretty sure my explanation was simple enough. There is a a form...frmView. It has a subform...sfrmView. sfrmView is set to continuous. sfrmView has a textbox called Color. Color is used for conditional formatting.(1 highlights, 0 UNhighlights) The value stored in color is a number(0,1). When the user moves to a different record...the before update changes COLOR to 0.(which UNhighlights my record) The On Current changes COLOR to 1.(Highlights record) When you leave the subform...the before update fires...(UNhighlights my record) I am trying to find a way for COLOR to be set to 0 before moving to another record...but not when leaving the subform...or have it set to 1 when leaving the subform. Thanks, Mark ----------------------------------------> From: jwcolby at colbyconsulting.com> To: accessd at databaseadvisors.com> Date: Thu, 20 Sep 2007 16:27:18 -0400> Subject: Re: [AccessD] Leave Subform>> Mark,>>>I just want to change a field in the subform to a certain value when the> user exits the subform.>> That is not plain English, that is database speak.>> I am trying to discover what you are doing so that I can suggest a different> way of doing it. What is the field? Why does it need to be set when the> user leaves the subform? What kind of value will go in the field? Is this> a "trail" of what the user was looking at last?>> A subform tries to save a record being edited when you leave the subform.> You are intentionally editing the subform record when you leave the subform.> The subform tries to save the record that you just edited. A vicious> circle...>> I would suggest that you will need to store the PK of the subform "current"> record, then from up in the main form run code to update that record, some> specific field. NOT EDIT A FIELD ON THE SUBFORM, but rather run SQL that> edits the record back in that table. You should be able to do that from the> OnExit of the subform control because SQL is editing data in a table, not> modifying a control on a subform.>> John W. Colby> Colby Consulting> www.ColbyConsulting.com> -----Original Message-----> From: accessd-bounces at databaseadvisors.com> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark A Matte> Sent: Thursday, September 20, 2007 3:59 PM> To: accessd at databaseadvisors.com> Subject: Re: [AccessD] Leave Subform>> John,>> I'm ok with the events in the subform firing...>> Plain English...I just want to change a field in the subform to a certain> value when the user exits the subform. I don't want this to happen when> they just move to another record in the same subform.>> Thanks,>> Mark>>>>From: "jwcolby" >>Reply-To: Access Developers discussion and problem>>solving>>To: "'Access Developers discussion and problem>>solving'">>Subject: Re: [AccessD] Leave Subform>>Date: Thu, 20 Sep 2007 15:42:30 -0400>>>>Mark,>>>>AFAIK this won't work. The problem is that when you change a record on>>the sub form events in the subform will fire.>>>>What are you really trying to do, in plain English?>>>>>>John W. Colby>>Colby Consulting>>www.ColbyConsulting.com>>-----Original Message----->>From: accessd-bounces at databaseadvisors.com>>[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark A Matte>>Sent: Thursday, September 20, 2007 3:21 PM>>To: accessd at databaseadvisors.com>>Subject: [AccessD] Leave Subform>>>>Hello All,>>>>Have an A97 db...I have a subform/continuous...when I leave/exit that>>subform I want to change a value on the current record of the subform.>>I thought I could do this by using the "On Exit" property of the subform.>>The>>problem is when I click out of the subform...the "on Exit" does>>fire...but if I put code in that references the field I want to>>change...the click part is cancelled and the subform maintains focus.>>>>Any suggestions?>>>>Thanks,>>>>Mark>>>>P.S...I can't use the "Before Update" of the subform itself...because>>going to a new record in the form does something different.>>>>_________________________________________________________________>>Kick back and relax with hot games and cool activities at the Messenger>>Cafi. http://www.cafemessenger.com?ocid=TXT_TAGHM_SeptHMtagline1>>>>>>-->>AccessD mailing list>>AccessD at databaseadvisors.com>>http://databaseadvisors.com/mailman/listinfo/accessd>>Website: http://www.databaseadvisors.com>> _________________________________________________________________> Gear up for Halo. 3 with free downloads and an exclusive offer.> http://gethalo3gear.com?ocid=SeptemberWLHalo3_MSNHMTxt_1>>> --> AccessD mailing list> AccessD at databaseadvisors.com> http://databaseadvisors.com/mailman/listinfo/accessd> Website: http://www.databaseadvisors.com _________________________________________________________________ More photos; more messages; more whatever – Get MORE with Windows Live™ Hotmail®. NOW with 5GB storage. http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_5G_0907