How to reference a subform field in code

jkfeagle

Codus Confusious
Local time
Today, 15:34
Joined
Aug 22, 2002
Messages
166
I know that in code to reference a field on your form you use the Me! prefix. But how do you reference a subform within that form?
 
In Access 97 I can reference txtName on a subform from the main form with:-
Forms!MainFormName!SubFormName!txtName

I can even abbreviate it to:-
SubFormName!txtName


But I read that some people still need the syntax used in Access 2:-
Forms!frmMain!frmSub.Form.Controls!txtName
 
Last edited:

Users who are viewing this thread

Back
Top Bottom