If the main form is bound and the sub form is bound, there is no need to have code "save" the entry/change.
The record(s) are saved automatically when you move to a different record.
If you think you must use code,
If fields "txtCompany_ID" and "txtAddressCode_ID" are numeric type, use
Code:
Private Sub btnUpdateAddress_Click()
'Append Company ID and Address ID when saved
sSql = "INSERT INTO tbl3Company_Address (Company_ID, Address_ID)"
sSql = sSql & "VALUES (" & Me.txtCompany_ID & ", " & Me.txtAddressCode_ID & ");"
CurrentDb.Execute sSql, dbFailOnError
End Sub
If fields "txtCompany_ID" and "txtAddressCode_ID" are text type, use
Code:
Private Sub btnUpdateAddress_Click()
'Append Company ID and Address ID when saved
sSql = "INSERT INTO tbl3Company_Address (Company_ID, Address_ID)"
sSql = sSql & "VALUES ('" & Me.txtCompany_ID & "', '" & Me.txtAddressCode_ID & "');"
CurrentDb.Execute sSql, dbFailOnError
End Sub