I created a form (F_Contractor Select1A) that adds a combo box to a customized parameter value popup box which allows you to select a contractor from a list (T_ContractorList). Once you select a contractor from the combo box list it runs a query (Q_Contractor#1A) that appends data to the current open form. However, it only appends it to a new record and I need it to append it to the current record open on the form (F_CurLoans). Code closes and reopens the current form once the data has been appended to the table (T_CurLoans) so that it displays on the form. How can I get it to append the current record?
Here's the query in SQL:
INSERT INTO T_CurLoans ( [Contractor Name#1], [Contractor#1Vendor#], [Contractor#1Fax#], [Contractor#1Cell#], [Contractor#1Phone#], [Contractor#1E-mail], [Contractor#1E-mail#2] )
SELECT [T_Contractor List].ContractorName, [T_Contractor List].[Vendor#], [T_Contractor List].[Fax#], [T_Contractor List].[Cell#], [T_Contractor List].[Phone#], [T_Contractor List].[E-mail], [T_Contractor List].[E-mail#2]
FROM [T_Contractor List]
WHERE ((([T_Contractor List].ContractorName)=[Forms]![F_Contractor Select1A]![Contrtactor List]));
Here's the code:
Private Sub Contrtactor_List_AfterUpdate()
DoCmd.OpenQuery "Q_Contractor#1A", acViewNormal, acEdit
DoCmd.Close acForm, "F_Contractor Select1A"
DoCmd.Close acForm, "F_CurLoans"
DoCmd.OpenForm "F_CurLoans"
End Sub
TIA, Julian