when you are on the main form use:
me.[name of your subform].form.[name of your control]
example with a subform called subform1 and a textbox called txt1
me.subform1.form.txt1
Relace subform1 with the name of your subform and txt1 with the name of
your control on your subform.
To find the name of your subform
Open your main form in design view, click once only on the subform so you
can see the black handles around it.
On the form's property sheet go to the tab called other,
on the right next to Name . . . . you will see the name of your subform.
Note: the name of the form on the data tab is not the name of your
subform -
it is the name of the form that is inside your subform.
Jeanette Cunningham
shiro said:
Dear Ms Jeanette,
My Access is Access 2000 and does have condition formatting?
But the problem, I can't refer to the control in my subform.
I have searched in microsoft knowledge base,and found 'how to
refer to control on subform' but It make no sense.Maybe I was
wrong on how to write the identifier.Please help,how you do it
to make it works?Thank's for reply.
Hi Shiro,
Does your version of Access have conditional formatting?
If it does, use conditional formatting to change the textbox color when
certain conditions are met.
Jeanette Cunningham
I tried to change my subform textbox backcolor to red on
AfterUpdate even but wasn't success.I want VBA code check
the subform textbox value,is it over or lower than the value
in a textbox in my mainform with IF statement but unsuccessful,
please help how to make it works.Thank's