How to open FORM which has "inner join" in source?
Code:
...
Dim idRS As DAO.Recordset, ShowIdentity
strSQL = "INSERT INTO tblZlecenia (id_zlecenia_info, DataPrzyjecia) VALUES ('" & _
ostateczne & "', " & _
Format(Date, "\#mm\/dd\/yyyy\#") & ")"
CurrentDb.Execute strSQL, dbFailOnError
Set idRS = CurrentDB.OpenRecordset("SELECT @@IDENTITY AS LastID;")
ShowIdentity = idRS!LastID
idRS.Close
Dim idRS1 As DAO.Recordset, ShowIdentity1
strSQL = "INSERT INTO tblOffset (id_zlecenia) VALUES ('" zlecenie_najwieksze "')"
CurrentDb.Execute strSQL, dbFailOnError
Set idRS1 = CurrentDB.OpenRecordset("SELECT @@IDENTITY AS LastID;")
ShowIdentity1 = idRS1!LastID
idRS1.Close
DoCmd.OpenForm "Formularz2", WhereCondition [COLOR="Red"]there must be [id_zlecenia] = showIdentity and [id_tblOffset] = showIdentity1[/COLOR]