Anishtain4
Registered User.
- Local time
- Today, 02:18
- Joined
- Apr 13, 2011
- Messages
- 21
I'm tring to get a SQL statement into a recordset but it is cutting when I'm trying to make it!!! I tried many different ways but it does not work my SQL is:
strFLD = "SELECT Contractor, Add_D, Chores.Type, Code, Finished, Reserved, Engineer,C_Prove"
strSQL1 = " FROM (Chores INNER JOIN Projects ON Chores.Project = Projects.Code) INNER JOIN Engineers ON Chores.Engineer = Engineers.Number"
strSQL2 = " WHERE ((((Chores.Finished) Is Null) OR ((Chores.C_Prove) Is Null)) AND ((Chores.Engineer)=" & Me.frm_Engineer.Value & "));"
strSQL = strFLD & strSQL1 & strSQL2
but when I want to use it in the openRecordset, the strSQL only contains:
"SELECT Contractor, Add_D, Chores.Type, Code, Finished, Reserved, Engineer,C_Prove FROM (Chores INNER JOIN Projects ON Chores.Project = Projects.Code) INNER JOIN Engineers ON Chores.Engineer = Engineers.Number WHERE ((((Chores.Finished) Is Null) OR ((
as you see the statement is not complete which result in a lot more recorsets, what should I do?
I have tried & _ and also & vbCrLf & _ don't tell me do that
strFLD = "SELECT Contractor, Add_D, Chores.Type, Code, Finished, Reserved, Engineer,C_Prove"
strSQL1 = " FROM (Chores INNER JOIN Projects ON Chores.Project = Projects.Code) INNER JOIN Engineers ON Chores.Engineer = Engineers.Number"
strSQL2 = " WHERE ((((Chores.Finished) Is Null) OR ((Chores.C_Prove) Is Null)) AND ((Chores.Engineer)=" & Me.frm_Engineer.Value & "));"
strSQL = strFLD & strSQL1 & strSQL2
but when I want to use it in the openRecordset, the strSQL only contains:
"SELECT Contractor, Add_D, Chores.Type, Code, Finished, Reserved, Engineer,C_Prove FROM (Chores INNER JOIN Projects ON Chores.Project = Projects.Code) INNER JOIN Engineers ON Chores.Engineer = Engineers.Number WHERE ((((Chores.Finished) Is Null) OR ((
as you see the statement is not complete which result in a lot more recorsets, what should I do?
I have tried & _ and also & vbCrLf & _ don't tell me do that