MarrowGenx
MIS
I am using an SQL statement in my OpenRecordset and for some reason it does not take the whole statement. It cuts the statement off towards the end. Is there any way around this? Below is my code. Thanks.
Public Sub Exporter(DivisionNumber As Single, RegionName As String, CycleName As String)
Dim dbs As DAO.Database
Dim rs As DAO.Recordset
Set dbs = CurrentDb
Set rs = dbs.OpenRecordset("Select [divname], [divcode], [regname], [cycname], [actname], [tblactivity].[actnum], [actdesc], [objname], [tblobjective].[objnum], [objdesc], [empname], [empnum] FROM qryresponsibilityfulldetail WHERE [divcode] = '" & DivisionNumber & "' and [regname] = " & """" & RegionName & """" & " and [cycname] = " & """" & CycleName & """" & ";", dbOpenDynaset)
End Sub
Public Sub Exporter(DivisionNumber As Single, RegionName As String, CycleName As String)
Dim dbs As DAO.Database
Dim rs As DAO.Recordset
Set dbs = CurrentDb
Set rs = dbs.OpenRecordset("Select [divname], [divcode], [regname], [cycname], [actname], [tblactivity].[actnum], [actdesc], [objname], [tblobjective].[objnum], [objdesc], [empname], [empnum] FROM qryresponsibilityfulldetail WHERE [divcode] = '" & DivisionNumber & "' and [regname] = " & """" & RegionName & """" & " and [cycname] = " & """" & CycleName & """" & ";", dbOpenDynaset)
End Sub