I have a form with the following unbound fields:
Side A
15 cbos with the same Row Source (connector1, connector2)
Side B
15 cbos with the same Row Source (same as Side A)
Vendors
6 cbos with the same Row Source (vendor1, vendor2)
Wire
3 groups of 3 fields - same Row Source
cboStyle
cboGauge
cboInsulation
When the Save button is selected I need the following to happen:
All fields in Side A inserted into the Side A table
All fields in Side B inserted into the Side B table
The PK from the newly inserted records in both Side A and Side B, along with
the balance of the data entered on the form to be inserted into my
tblDetails table.
Is this even possible or good db design/process?
The SQL code I have for just inserting into Side A and B will not work as written: I am getting a "Characters found after the end of the SQL statement" message and, if I remove the ";" I get a "Missing ;" message:
Private Sub Command156_Click()
Dim strSQL As String
strSQL = "INSERT INTO SideA(conn1,conn2,conn3) VALUES(cboOne,cboTwo,cboThree);"
strSQL = strSQL & "INSERT INTO SideB(conn1,conn2,conn3)VALUES(cboOneB,cboTwoB,cboThreeB);"
DoCmd.RunSQL strSQL
End Sub
Any suggestions would be helpful.
Thanks,
Toni
Side A
15 cbos with the same Row Source (connector1, connector2)
Side B
15 cbos with the same Row Source (same as Side A)
Vendors
6 cbos with the same Row Source (vendor1, vendor2)
Wire
3 groups of 3 fields - same Row Source
cboStyle
cboGauge
cboInsulation
When the Save button is selected I need the following to happen:
All fields in Side A inserted into the Side A table
All fields in Side B inserted into the Side B table
The PK from the newly inserted records in both Side A and Side B, along with
the balance of the data entered on the form to be inserted into my
tblDetails table.
Is this even possible or good db design/process?
The SQL code I have for just inserting into Side A and B will not work as written: I am getting a "Characters found after the end of the SQL statement" message and, if I remove the ";" I get a "Missing ;" message:
Private Sub Command156_Click()
Dim strSQL As String
strSQL = "INSERT INTO SideA(conn1,conn2,conn3) VALUES(cboOne,cboTwo,cboThree);"
strSQL = strSQL & "INSERT INTO SideB(conn1,conn2,conn3)VALUES(cboOneB,cboTwoB,cboThreeB);"
DoCmd.RunSQL strSQL
End Sub
Any suggestions would be helpful.
Thanks,
Toni