On the main form I have a field called "FacilityAbbreviation", I want to use this field to set the default values on a subform.
Code:
Private Sub Form_Load()
[Forms]![frmAddFacilityPatients]![subformtblNewFacilityPatient].[Form]![FacilityAbbreviation].DefaultValue = Me.FacilityAbbreviation.Value
Me.Text15 = Me.FacilityAbbreviation.Value
End Sub
This should work; I get a #NAME? in the FacilityAbbreviation field in the subform; and I get the Facility Abbreviation in Text15. how come its being put into the textbox but not the subform correctly? Is it because of the event?
I am going to try and switch it up right now and try and pull the value from the subform instead of the subform trying to have the data in-put;
I tried this but still same results... maybe I need to try Me.FacilityAbbreviation.text? or making that into a string before putting it into the subform.