Associate
- Joined
- 27 Jan 2005
- Posts
- 1,397
- Location
- S. Yorks
I have an access database and on one of the forms there is a tabcontrol. Witihn one of the tabcontrols there is a subform - I am having problems referring to a control on a subform.
throughout the tab controls there are numerous free text fields, when a user double clicks on one of these a new form - frmFreeText - should be generated with a larger free text box on it, the user enters text to this and then closers it, upon doing so the text is transferred to the control that called the frmFreeText.
All works well by using the following:
forms!frmRecordAdd!(forms!frmRecordAdd.callingfield) = txtinfo
txtinfo is the textbox on frmFreeText
callingfield is a public variable on the main form.
However, when I call the above from a subform it falls over with cannot find control.
have tried
forms!frmRecordAdd.callingfield = "subformname.form!txtbox"
forms!frmRecordAdd!(forms!frmRecordAdd.callingfield) = txtinfo
Using immediate window I can referance the control I want to write to by using:
Forms!frmRecordAdd!subformname.form!txtbox
What am I doing wrong?
regards,
Matt
throughout the tab controls there are numerous free text fields, when a user double clicks on one of these a new form - frmFreeText - should be generated with a larger free text box on it, the user enters text to this and then closers it, upon doing so the text is transferred to the control that called the frmFreeText.
All works well by using the following:
forms!frmRecordAdd!(forms!frmRecordAdd.callingfield) = txtinfo
txtinfo is the textbox on frmFreeText
callingfield is a public variable on the main form.
However, when I call the above from a subform it falls over with cannot find control.
have tried
forms!frmRecordAdd.callingfield = "subformname.form!txtbox"
forms!frmRecordAdd!(forms!frmRecordAdd.callingfield) = txtinfo
Using immediate window I can referance the control I want to write to by using:
Forms!frmRecordAdd!subformname.form!txtbox
What am I doing wrong?
regards,
Matt