Format Record in Subform

  • Thread starter Thread starter Maxine
  • Start date Start date
M

Maxine

Want to find a record in a subform and change
its .backcolor. Have tried FindFirst and Seek from both
the main form and the subform but can't get it to work. It
seems to find OK but can't change the .backcolor on just
one record of the subform.

Any help would be appreciated.

Maxine
 
Maxine said:
Want to find a record in a subform and change
its .backcolor. Have tried FindFirst and Seek from both
the main form and the subform but can't get it to work. It
seems to find OK but can't change the .backcolor on just
one record of the subform.

You can use Conditional Formatting to do this. Create a
(invisible?) text box in the form's header section. Then
use the form's Current event to assign the record's key
field to the text box.

Next create a text box that's the same size as the entire
detail section and use Format - Send to Back to put it
behind all the other controls. Use Format - Conditional
Formatting on this text box with the Expression Is set to
[keyfield] = [headerttextbox] and select the desired
BackColor.

(You may also want to set all the other detail section
control's BackStyle to Transparent??)
 
Worked great in Access 2000. How about Access 97? No
Conditional Format on the menu.
Maxine
-----Original Message-----
Maxine said:
Want to find a record in a subform and change
its .backcolor. Have tried FindFirst and Seek from both
the main form and the subform but can't get it to work. It
seems to find OK but can't change the .backcolor on just
one record of the subform.

You can use Conditional Formatting to do this. Create a
(invisible?) text box in the form's header section. Then
use the form's Current event to assign the record's key
field to the text box.

Next create a text box that's the same size as the entire
detail section and use Format - Send to Back to put it
behind all the other controls. Use Format - Conditional
Formatting on this text box with the Expression Is set to
[keyfield] = [headerttextbox] and select the desired
BackColor.

(You may also want to set all the other detail section
control's BackStyle to Transparent??)
 
Here's some articles that describe techniques that were used
in A97:

http://www.mvps.org/access/forms/frm0047.htm
http://www.mvps.org/access/forms/frm0055.htm

http://www.lebans.com/formatbycriteria.htm

http://www.mvps.org/access/forms/frm0024.htm
--
Marsh
MVP [MS Access]


Worked great in Access 2000. How about Access 97? No
Conditional Format on the menu.
Maxine
-----Original Message-----
Maxine said:
Want to find a record in a subform and change
its .backcolor. Have tried FindFirst and Seek from both
the main form and the subform but can't get it to work. It
seems to find OK but can't change the .backcolor on just
one record of the subform.

You can use Conditional Formatting to do this. Create a
(invisible?) text box in the form's header section. Then
use the form's Current event to assign the record's key
field to the text box.

Next create a text box that's the same size as the entire
detail section and use Format - Send to Back to put it
behind all the other controls. Use Format - Conditional
Formatting on this text box with the Expression Is set to
[keyfield] = [headerttextbox] and select the desired
BackColor.

(You may also want to set all the other detail section
control's BackStyle to Transparent??)
 
Back
Top