Prev: Report filter question
Next: Running Sum
From: Joel on 22 Mar 2010 21:31 TIA: Access 2007. I have a 'summary' report grouped by [request date], no detailed section. The field in the report design for the group is [request date by day]. I'm trying to be able to double click on a group date in the report and open another report with detailed info based on the group date double clicked on in the summary report. I tried on dbl click: dim rd as date rd=me.[request date by day] 'set date value = group date docmd.openreport "detail", acPreview, "[request date by day]=" & rd the "detail" report open but not by group date...i see all date groups. Any help is much appreciated, THANKS, Joel
From: Dennis on 22 Mar 2010 22:56 Joel, I tried on dbl click: dim rd as date rd=me.[request date by day] 'set date value = group date docmd.openreport "detail", acPreview, "[request date by day]=" & rd the "detail" report open but not by group date...i see all date groups. in you OpenReport "command" you are using the Filter Name field. I've tried to use this field and could not get it to work. I posted a similar question to your and was told to use the "Where" parameter instead of the Filter parameter. I don't know the specifics but I can get the Where parameter to work, but could not get the Filter parm to work. Maybe some one in the know can explain. DoCmd.OpenReport(ReportName, View, FilterName, WhereCondition, ViewMode, OpenArgs). The where condition is a valid SQL Where clause without the work "WHERE". Good luck. Dennis
From: Allen Browne on 22 Mar 2010 22:58 Open the report in Report view (not print preview) if you want to drill-down. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Joel" <Joel(a)discussions.microsoft.com> wrote in message news:7F7188DC-744B-4E73-8B5C-03CACFAAAE2F(a)microsoft.com... > TIA: > > Access 2007. I have a 'summary' report grouped by [request date], no > detailed section. The field in the report design for the group is > [request > date by day]. I'm trying to be able to double click on a group date in > the > report and open another report with detailed info based on the group date > double clicked on in the summary report. > > I tried on dbl click: > dim rd as date > rd=me.[request date by day] 'set date value = group date > docmd.openreport "detail", acPreview, "[request date by day]=" & rd > > the "detail" report open but not by group date...i see all date groups. > > Any help is much appreciated, THANKS, > > Joel
From: Joel on 22 Mar 2010 23:17 Thanks Dennis: I understand, actually, I ment docmd.openreport "detail", acPreview, , "[request date by day]=" & rd I did mean to define a where clause...the clause i have doesn't work. that's the problem. "Dennis" wrote: > Joel, > > I tried on dbl click: > dim rd as date > rd=me.[request date by day] 'set date value = group date > docmd.openreport "detail", acPreview, "[request date by day]=" & rd > > the "detail" report open but not by group date...i see all date groups. > > > > in you OpenReport "command" you are using the Filter Name field. I've tried > to use this field and could not get it to work. I posted a similar question > to your and was told to use the "Where" parameter instead of the Filter > parameter. > > I don't know the specifics but I can get the Where parameter to work, but > could not get the Filter parm to work. Maybe some one in the know can > explain. > > DoCmd.OpenReport(ReportName, View, FilterName, WhereCondition, ViewMode, > OpenArgs). > > The where condition is a valid SQL Where clause without the work "WHERE". > > > Good luck. > > > Dennis >
From: Allen Browne on 23 Mar 2010 01:36
Dim strWhere As String If IsDate(me.[request date by day]) Then strWhere = "[request date by day] = #" & Format(Me.[request date by day], "yyyy\/mm\/dd") & "#" End If docmd.openreport "detail", acPreview, , strWhere -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Joel" <Joel(a)discussions.microsoft.com> wrote in message news:A4CA2410-896F-4AAF-8FFE-995CD34BDA90(a)microsoft.com... > Thanks Dennis: > > I understand, actually, I ment > docmd.openreport "detail", acPreview, , "[request date by day]=" & rd > I did mean to define a where clause...the clause i have doesn't work. > that's the problem. > > "Dennis" wrote: > >> Joel, >> >> I tried on dbl click: >> dim rd as date >> rd=me.[request date by day] 'set date value = group date >> docmd.openreport "detail", acPreview, "[request date by day]=" & rd >> >> the "detail" report open but not by group date...i see all date groups. >> >> >> >> in you OpenReport "command" you are using the Filter Name field. I've >> tried >> to use this field and could not get it to work. I posted a similar >> question >> to your and was told to use the "Where" parameter instead of the Filter >> parameter. >> >> I don't know the specifics but I can get the Where parameter to work, but >> could not get the Filter parm to work. Maybe some one in the know can >> explain. >> >> DoCmd.OpenReport(ReportName, View, FilterName, WhereCondition, ViewMode, >> OpenArgs). >> >> The where condition is a valid SQL Where clause without the work "WHERE". >> >> >> Good luck. >> >> >> Dennis >> |