As a rule functions are not used to return records or recordsets or even values from recordsets. The purpose of a function is to perform an action on some value(s) passed to it. Subroutines are usually used for this purpose. What are you trying to do?
In a module you define a global variable by dimming it with the Public keyword.
Public txtGlobal As Text
it is then available in any module anywhere. So in the AfterUpdate event of the control in your form you'd assign the value to the global variable:
txtGlobal = Me.txtSample
I suspect that Pat has an autonumber field in the intersect table that is used as a pseudo primary key. The real primary key is probably a compound key made up of the two foreign keys from the other tables. By creating a compound key you insure that you do not duplicate any one many-to-many...
Anytime a control is disable (enable = false) it goes gray. If you want it to remain un-grayed you can do one of two things. Set it's enable property to no and it's locked property to yes. Or just set it's locked property to yes.