[AccessD] Highlight field being edited in a continuous form - in9simple steps.

Scott Marcus marcus at tsstech.com
Thu May 20 14:06:25 CDT 2004


Does this method involve adding a field to the record? If so, I've done that before. I just wanted something quick and dirty<g>. But hey, send it to me anyway. Maybe your method is better than mine. 

Scott Marcus
TSS Technologies, Inc.
marcus at tsstech.com
(513) 772-7000

 -----Original Message-----
From: 	accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]  On Behalf Of Jim Dettman
Sent:	Thursday, May 20, 2004 2:57 PM
To:	Access Developers discussion and problem solving
Subject:	RE: [AccessD] Highlight field being edited in a continuous form - in9simple steps.

Scott,

 Well now that you've finished all that<g>, I have a sample MDB which has a
slightly different method of coloring rows (or individual controls if you
want), which is slightly more flexible.  Your not stuck with just colors
either, but can display graphics as well.

  Also, since it's not based on using Format or the terminal font, you can
do anything you want for fonts.

  If you'd like to see it drop 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 Scott Marcus
Sent: Thursday, May 20, 2004 9:16 AM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Highlight field being edited in a continuous form
- in9 simple steps.


Thanks to all those who helped me figure this out(you know who you are). I
can now highlight individual fields, that have the focus, on a continuous
form.

It required the following (clean up tweaks not included):

1) set the Back Style of each highlighted field to "Transparent". (I didn't
do this because I'm only highlighting check boxes).

2) create form level public global Boolean variables for each highlighted
field

3) create an unbound textbox to hold the current value of the key for the
selected record

4) create an unbound textbox behind each field to show the highlighting

5) set the Font of the unbound highlighting textbox to "Terminal"

6) set the Fore Color of the unbound highlighting textbox to the color you
want for highlighting

7) set the Control Source for each highlighting textbox to the following
(replacing field, form and control names with the appropriate values):
         "=IIf([key_field]=[Forms]![frmYour_Form_Name]![txtUnbound_Textbox]
          And [bolBooleanVariable]=True,"ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ",Null)"

8) add 2 lines of code per field in the Got Focus and Lost Focus events
a) in the Got Focus event, set the Boolean variable to true
b) in the Lost Focus event, set the Boolean variable to false
c) in both events, requery the highlight textbox for the given control

9) add 1 line of code to set the unbound textbox to the key of the current
record in the Forms Current event

********************
Hopefully I didn't miss anything. Please keep the following in mind:

1) This is just a quick synopsis of what I did.

2) The highlighting on my form actually takes place on a sub form.

3) The unbound textbox that holds the key field value is on the parent form.

4) I developed this to highlight checkboxes and have not tested it with
other controls. It should still work the same.

Scott Marcus
TSS Technologies, Inc.
marcus at tsstech.com
(513) 772-7000



--
_______________________________________________
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







More information about the AccessD mailing list