I have a code, I'll show a part, because the code is long
I would like add new part of sql code but I don't know how to write it.
Insert into tblGoraZlecenia.Id_Pracownika from Forms!frmzlecenieMarzena!Imie where "WHERE ID_Zlecenia ='" & idnowego & "'". I know that the form should be open.
Code:
Public Function PrzeniesZlecenie(idStarego As String, kopiuj_pliki As Boolean, kopiuj_montaz As Boolean) As Boolean
PrzeniesZlecenie = False
Dim db As DAO.Database
Dim strSQL As String
Dim recIn As Recordset
Dim ID As String
Dim rs As DAO.Recordset
Dim strLastField1 As String
Dim blad As String
Dim idki() As String
Dim idNowego As String
Dim idNowegoZD As String
Dim i As Integer
strSQL = "INSERT INTO tblGoraZlecenia ( Nazwa, [Kolory P], [Kolory T], ID_Zlecenia, [Format_(X)]," & _
"[Format_(Y)], Ilość, Opis, PapierGramatura ) " & _
"SELECT Nazwa, [Kolory P], [Kolory T], '" & idNowego & "', [Format_(X)]," & _
"[Format_(Y)] , Ilość, Opis, PapierGramatura " & _
"FROM tblGoraZleceniaZakonczone " & _
"WHERE ID_Zlecenia ='" & idStarego & "'"
CurrentDb.Execute strSQL
I would like add new part of sql code but I don't know how to write it.
Insert into tblGoraZlecenia.Id_Pracownika from Forms!frmzlecenieMarzena!Imie where "WHERE ID_Zlecenia ='" & idnowego & "'". I know that the form should be open.