RecordSelectors Property

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

tina

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

tina

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
 
T

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.
 

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