Hi
I have frmRecords and pop up form frmAddRecords , i want frmAddRecords pop form to pass data to frmRecords for selected fields, frmRecords have all table fields but frmAddrecords have just 4 fields for tblRecords.
tblRecords
Primary Key is RecordID which is autonumber.
frmAddRecords have four fields from tblRecords which is [RecordID], [EmpID],[Reference],[SponsorID] four out of 3 fields are combobox.
I have following code but its not working.
I have frmRecords and pop up form frmAddRecords , i want frmAddRecords pop form to pass data to frmRecords for selected fields, frmRecords have all table fields but frmAddrecords have just 4 fields for tblRecords.
tblRecords
Primary Key is RecordID which is autonumber.
frmAddRecords have four fields from tblRecords which is [RecordID], [EmpID],[Reference],[SponsorID] four out of 3 fields are combobox.
I have following code but its not working.
Code:
Private Sub btnClose_Click()
If Not IsNull(txtReference) Then
Forms![frmRecords].Form.[frmAddRecords].Form.cboReference = Me.txtReference
'Forms![frmRecords].Form.[frmAddRecords].Form.cboEmpID = Me.txtEmpID
'Forms![frmRecords].Form.[frmAddRecords].Form.cboSponsorID = Me.txtSponsorID
'Forms![frmRecords].Form.[frmAddRecords].Form.RecordID = Me.txtRecordID
Forms![frmRecords].Form.[frmAddRecords].Form.cboReference.SetFocus
End If
DoCmd.Close
End Sub