Sub form controls

  • Thread starter Thread starter Joe Fawcett
  • Start date Start date
J

Joe Fawcett

From my searchjes this may not be possible but...
I have a subform showing items related to the main form, this is in
continuous view. Because of space available I have a command button on the
sub form which, when clicked, show extra details. The user has requested
that this be disabled if there is no extra data. The presence of extra data
can be ascertained from the query source, there could be a field in there
with a Boolean type showing data or not but I can't find an event which
fires for each instance of the sub form being created.
 
Try the Current Event of the Form that you use as the SourceObject of
the Subform Control.
 
Is the CommandButton you want to enable / disable in the Detail section of
the SourceObject for the SubformControl?

If this is the case, you will see a copy of the CommandButton for each
Record in the ContinuousFormView. However, they are just instances of the
SAME control and you cannot enable some instances and disable some other
instances.

If the CommandButton is in the Header of Footer section of the Form (you see
only ONE instance of the CommandButton in the Header or Footer), you can
enable / disable this according to the "Current" Record on the Subform using
the Form_Current Event of the SourceObject of the Subform Control.

Does that answer your question or just muddy up the waters a bit more?
 
Van T. Dinh said:
Is the CommandButton you want to enable / disable in the Detail section of
the SourceObject for the SubformControl?

If this is the case, you will see a copy of the CommandButton for each
Record in the ContinuousFormView. However, they are just instances of the
SAME control and you cannot enable some instances and disable some other
instances.

If the CommandButton is in the Header of Footer section of the Form (you see
only ONE instance of the CommandButton in the Header or Footer), you can
enable / disable this according to the "Current" Record on the Subform using
the Form_Current Event of the SourceObject of the Subform Control.

Does that answer your question or just muddy up the waters a bit more?
I'm afraid it confirms my suspicions, I can't enable some and disable
others. Thanks again for taking the time to help.
 
Back
Top