V
Vsn
Hi there,
I still do not get it completely with the report record source via the
'docmd.openreport'.
I created and sql statment in the variable stgFilter
stgFilter = "" _
& "SELECT tblProjects.[Location / Project] AS Loc,
tblProjects.ClientName, tblProjects.ContactPerson, tblProjects.StartDate,
tblProjects.Enddate, tblProjects.fProjectLocation, Left([Loc],2) AS Area" _
& "FROM tblProjects LEFT JOIN tblProjectText ON
tblProjects.[Location / Project] = tblProjectText.fProjectID" _
& "WHERE ((tblProjects.Enddate) >=#13-03-2004# And
((LocationCheck([tblProjects]![Location / Project])) = -1) And
((tblProjects.fDateCancel) Is Null)) Or (((tblProjects.Enddate) Is Null) And
((LocationCheck([tblProjects]![Location / Project])) = -1) And
((tblProjects.fDateCancel) Is Null))" _
& "ORDER BY tblProjects.[Location / Project]" _
& "WITH OWNERACCESS OPTION;"
Then i launch it to an report which does not have a record source like this
DoCmd.OpenReport stgReport, acViewPreview, stgFilter, stgWhere,
acWindowNormal, stgArgument
Still the report does not get this sql/stgFilter as record source?
If the report does have a record source the new one launched via the doopen
command from the form does not over rule the original one.
Idea is that the stgFilter is buildup from information which the user
completes on the form.
What am i doing wrong?
Thx,
Ludovic
I still do not get it completely with the report record source via the
'docmd.openreport'.
I created and sql statment in the variable stgFilter
stgFilter = "" _
& "SELECT tblProjects.[Location / Project] AS Loc,
tblProjects.ClientName, tblProjects.ContactPerson, tblProjects.StartDate,
tblProjects.Enddate, tblProjects.fProjectLocation, Left([Loc],2) AS Area" _
& "FROM tblProjects LEFT JOIN tblProjectText ON
tblProjects.[Location / Project] = tblProjectText.fProjectID" _
& "WHERE ((tblProjects.Enddate) >=#13-03-2004# And
((LocationCheck([tblProjects]![Location / Project])) = -1) And
((tblProjects.fDateCancel) Is Null)) Or (((tblProjects.Enddate) Is Null) And
((LocationCheck([tblProjects]![Location / Project])) = -1) And
((tblProjects.fDateCancel) Is Null))" _
& "ORDER BY tblProjects.[Location / Project]" _
& "WITH OWNERACCESS OPTION;"
Then i launch it to an report which does not have a record source like this
DoCmd.OpenReport stgReport, acViewPreview, stgFilter, stgWhere,
acWindowNormal, stgArgument
Still the report does not get this sql/stgFilter as record source?
If the report does have a record source the new one launched via the doopen
command from the form does not over rule the original one.
Idea is that the stgFilter is buildup from information which the user
completes on the form.
What am i doing wrong?
Thx,
Ludovic