It also could be done with the DLookup function. I've used that quite a bit and it seems to mimic the Auto-fill action pretty well.
Me.txtField= Dlookup([tableName, fieldname, condition)
I believe that is the correct syntax. You might have to check it out thought.