I know that I can access the data on a subform using syntax like
What I'm trying to do now, is to write a function that will take the field name as a string and do the logical equivalent of:
Is there a cleaner way to do this?
Code:
me.subform.form.field
What I'm trying to do now, is to write a function that will take the field name as a string and do the logical equivalent of:
Code:
private function getField (field as String)
dim ctl as control
For Each ctl In Me.subform
If ctl.name = field then getField = ctl.value
Next ctl
end function
Is there a cleaner way to do this?