Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to set data in a field in a sub-form from the form??

Status
Not open for further replies.

virginie

Programmer
Jul 24, 2002
53
IL
i have a sub-form in a form
i want to lock a field in the subform according to a condition from the principal form.
i try :
If commitdate.Value <> &quot;&quot; Then
supply.Locked = True
// this works : this field is in the principal form
order_details.descr.Locked = True
//this dont work : order_details is the subform name and descr is the field name i want to change

how can i access this field from the princpal form?
 
When you are in the main form and want to reference the sub form you must fully qualify the name.

Forms![MainForm]![SubForm]![descr]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top