Working with FormatConditions in a subform

D

David C. Holley

I'm trying to modify the FormatConditions of fields on a subform using
code. When I try using the following code...

[Forms]![frmReservations].Form![subfrmTransferGuests].Controls(i).FormatConditions(1)

The code takes place in a loop and tests if the control being examined
has been flagged via the TAG property as having a conditionalFormat, so
I have ensured that I'm not trying this on a field without the CF.

Access throws and error to the effect that the value exceeds the number
of format conditions. When I snoop around, using a different property
Access correctly returns the values expected. As in...

[Forms]![frmReservations].Form![subfrmTransferGuests].Controls(i).name

in the immediate window using breakpoints.

David H
 
D

David C. Holley

David said:
I'm trying to modify the FormatConditions of fields on a subform using
code. When I try using the following code...

[Forms]![frmReservations].Form![subfrmTransferGuests].Controls(i).FormatConditions(1)


The code takes place in a loop and tests if the control being examined
has been flagged via the TAG property as having a conditionalFormat, so
I have ensured that I'm not trying this on a field without the CF.

Access throws and error to the effect that the value exceeds the number
of format conditions. When I snoop around, using a different property
Access correctly returns the values expected. As in...

[Forms]![frmReservations].Form![subfrmTransferGuests].Controls(i).name

in the immediate window using breakpoints.

David H
 

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