using Me with subform

  • Thread starter Thread starter GeorgeMar
  • Start date Start date
G

GeorgeMar

"Me" can be used in a loop, such as when I want to turn a
number of controls visible by doing something like:

for i =1 to 5
me("ControlName" & i).visible=true
next

When I do the same thing with a control on a subform it
doesn't work. I get: "Control not found ..."

Here is what I have:

for i=1 to 5
me("SubformName.form.ControlName" & i).ColumnHidden=True
next

Can you tell me if what I am doing is possible?

many thanks
george
 
GeorgeMar said:
"Me" can be used in a loop, such as when I want to turn a
number of controls visible by doing something like:

for i =1 to 5
me("ControlName" & i).visible=true
next

When I do the same thing with a control on a subform it
doesn't work. I get: "Control not found ..."

Here is what I have:

for i=1 to 5
me("SubformName.form.ControlName" & i).ColumnHidden=True
next

Can you tell me if what I am doing is possible?

Try...

for i=1 to 5
me.SubformName.form("ControlName" & i).ColumnHidden=True
next
 
Thank you Rick. It worked.

George
-----Original Message-----


Try...

for i=1 to 5
me.SubformName.form("ControlName" & i).ColumnHidden=True
next


--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com



.
 
Back
Top