alightchaser
Programmer
I'm new at this so be patient with me...
I need to update a M2M table (contractors assigned to projects) with contractor ids from the contractor table and project id from the project table. The contractors and projects are selected from two combo boxes cmbx_contractor_id_name & cmbx_project_id_name on the form frm_assign_contractor_project.
I get a runtime error 450 - Wrong number of input arguements or invalid property assignment on the
contractorid = [Forms]!...statement in the following code..
Private Sub save_cont_proj_Click()
Dim contractorid As Integer
Dim projectid As Integer
Dim thisdb As Database
Dim strSQLQuery As String
Set thisdb = CurrentDb()
contractorid = [Forms]![frm_assign_contractor_project]![cmbx_contractor_id_name].[Column](0)
projectid = [Forms]![frm_assign_contractor_project]![cmbx_project_id_name].[Column](0)
strSQLQuery = "INSERT INTO tbl_contractor_project (contractor_id , project_id) VALUES (" & contractorid & "," & projectid & ""
thisdb.Execute strSQLQuery
End Sub
Alightchaser
I need to update a M2M table (contractors assigned to projects) with contractor ids from the contractor table and project id from the project table. The contractors and projects are selected from two combo boxes cmbx_contractor_id_name & cmbx_project_id_name on the form frm_assign_contractor_project.
I get a runtime error 450 - Wrong number of input arguements or invalid property assignment on the
contractorid = [Forms]!...statement in the following code..
Private Sub save_cont_proj_Click()
Dim contractorid As Integer
Dim projectid As Integer
Dim thisdb As Database
Dim strSQLQuery As String
Set thisdb = CurrentDb()
contractorid = [Forms]![frm_assign_contractor_project]![cmbx_contractor_id_name].[Column](0)
projectid = [Forms]![frm_assign_contractor_project]![cmbx_project_id_name].[Column](0)
strSQLQuery = "INSERT INTO tbl_contractor_project (contractor_id , project_id) VALUES (" & contractorid & "," & projectid & ""
thisdb.Execute strSQLQuery
End Sub
Alightchaser