RecordSelectors Property

  • Thread starter Thread starter Richard S.
  • Start date Start date
R

Richard S.

I am trying to programatically enable or disable record selectors for a
subform in form view depending on a condition in the underlying table.

The following statement in the parent form,
Me!SubFrmMbrsSelectedForList.RecordSelectors = True

causes this error: "Object doesn't support this property or method."

Is the property not able to be set in this manner, or is my syntax in error?
 
you're probably close. first, make sure the name of the *subform control
within the mainform* is correct. to find out, open the mainform in Design
view. click ONCE on the subform, to select it. in the Properties box, look
at the Name property. *that name* is the one you need to reference in your
code. then you need to a reference to the Form object. so if the "subform
control within the mainform" is "ChildMembers", for example, the code would
be

Me!ChildMembers.Form.RecordSelectors = True

hth


Richard S. said:
I am trying to programatically enable or disable record selectors for a
subform in form view depending on a condition in the underlying table.

The following statement in the parent form,
Me!SubFrmMbrsSelectedForList.RecordSelectors = True

causes this error: "Object doesn't support this property or method."

Is the property not able to be set in this manner, or is my syntax in
error?
 
hi Arvin. i just tested the code, running it from a command button, in an
A2000 db running in A2003, as

Me.RecordSelectors = Not Me.RecordSelectors

it ran fine in Form view, toggling the property setting with no problem. i
didn't test it in a subform setup, but i'd think the outcome would be the
same. am i missing something? tia, tina
 
okay, i got my lazy rear moving, and tested the code from a mainform command
button, acting on a subform, as

Me!ChildSub.Form.RecordSelectors = Not Me!ChildSub.Form.RecordSelectors

same outcome as the previous test. in fact, since i used the previously
built and tested form as the subform for the new test, i found that both
command buttons (on the subform and on the mainform) toggled the subform
property without incident.
 
Back
Top