From: Joel on
Hello Allen:

thanks so much, unfortunately, the report opens with all records

Joel

"Allen Browne" wrote:

> 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
> >>
> .
>
From: Joel on
Hello Allen:

I've been messing with this and believe its a format issue...here's more
detail
[request date by day] is =Format$([Request Date],"Long Date",0,0) this was
created by report wizard for group in report

[request date] is date and time format such as 3/22/2010 3:00:00 pm

Any other ideas?

Thanks,

Joel

"Joel" wrote:

> Hello Allen:
>
> thanks so much, unfortunately, the report opens with all records
>
> Joel
>
> "Allen Browne" wrote:
>
> > 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
> > >>
> > .
> >
From: Joel on
Allen:

interesting...

if I use
docmd.openreport "detail", acPreview, , [request date]=#3/22/2010 3:00:00 pm#"
works fine and opens with specific date
if I try
docmd.openreport "detail", acPreview, , [request date by day]=#3/22/2010
3:00:00 pm#" I have window asking for value.

???


Joel

"Allen Browne" wrote:

> 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
> >>
> .
>
From: John Spencer on
That indicates that the report source has a field named [Request Date] and not
a field named [Request date by Day].

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

Joel wrote:
> Allen:
>
> interesting...
>
> if I use
> docmd.openreport "detail", acPreview, , [request date]=#3/22/2010 3:00:00 pm#"
> works fine and opens with specific date
> if I try
> docmd.openreport "detail", acPreview, , [request date by day]=#3/22/2010
> 3:00:00 pm#" I have window asking for value.
>
> ???
>
>
> Joel
>
> "Allen Browne" wrote:
>
>> 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
>>>>
>> .
>>
First  |  Prev  | 
Pages: 1 2
Prev: Report filter question
Next: Running Sum