Format Record in Subform

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
 
M

Marshall Barton

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??)
 
M

Maxine

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??)
 
M

Marshall Barton

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??)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top